Something like plugin manager for kornshell
- 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
- macOS
- SunOS
- FreeBSD and OpenBSD
- Linux should also work
- even Android
-
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>
-
-
Run:
ksh -c "$(curl -fsSL https://raw.githubusercontent.com/DesantBucie/korny/master/bin/install.ksh)"
-
Only ksh93u+m supports autocd, so note that.
-
Some systems may require setting
export ENV=$HOME/.kshrc
3 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 line named PROMPT
in ~/.kshrc
to filename without extension i.e ibsd
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.
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)
Type: korn u
or korn update
Type: korn rm
or korn remove