GithubHelp home page GithubHelp logo

desantbucie / korny Goto Github PK

View Code? Open in Web Editor NEW
12.0 1.0 1.0 3.51 MB

[pd/m/o]ksh[93] plugin. Coloring built in.

License: Other

Shell 100.00%
ksh ksh93 ohmyzsh-alternative kornshell theme pdksh mksh shell bash

korny's Introduction

korny

Something like plugin manager for kornshell

Oh Korny

Requirements

  • git (avoid apple crappy one, install one from nix or brew1)
  • ksh93 (Best option), pdksh or mksh(with limitations2).
  • printf built-in to shell, or as external program

Tested OSes

  • macOS
  • SunOS
  • FreeBSD and OpenBSD
  • Linux should also work
  • even Android

Installation

  1. Change default shell to kornshell(if you have to):

    • which ksh - output will be path to ksh

    • Make sure that ksh is in /etc/shells, if there isn't, enter full path

    • chsh -s <PATH TO KSH>

  2. Run: ksh -c "$(curl -fsSL https://raw.githubusercontent.com/DesantBucie/korny/master/bin/install.ksh)"

  3. Only ksh93u+m supports autocd, so note that.

  4. Some systems may require setting export ENV=$HOME/.kshrc3 in ~/.profile or /etc/profile(don't forget to reboot).

Also mksh use .mkshrc, so you either rename .kshrc to .mkshrc, or use step above

Change prompt

Change line named PROMPT in ~/.kshrc to filename without extension i.e ibsd

alt

Load plugins

By default you will load git_aliases and android plugins(plus base plugins starting with. _). Plugins with .ksh93, are for ksh93 only. To add plugin, just edit ~/.kshrc, enter it's filename

set -A plugins_array -- \
android git_aliases #Load plugins
load_plugs 

To see all plugins, check plugin folder.

Load completion

Completion works only in oksh, it is forked from ohmyksh

You load it the same way as plugins, in ~/.kshrc but istead of plugins-array load it in completion_array just below

Note that not all completions are crossplatform(i.e openbsd)

Update

Type: korn u or korn update

Uninstall

Type: korn rm or korn remove

Footnotes

  1. This is why.

  2. As I tested it on NetBSD, there were problems with prompt loading if there were too many lines in PS1 variable. It cannot be fixed from this level most likely.

  3. You can set any path(and copy .kshrc there), for example i have it under export ENV="$HOME/.config/ksh/rc"

korny's People

Contributors

desantbucie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

icaropablo

korny's Issues

Question: why avoid apple git?

In your readme, you have,

git (avoid apple crappy one, install one from nix or brew)

This is the first time I've been advised to avoid Apple git. I'm curious, why should I avoid it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.