ohmyksh/README.org

75 lines
2.0 KiB
Org Mode
Raw Normal View History

2020-07-15 16:28:24 -06:00
* ohmyksh
Have your cake and eat it too!
~ohmyksh~ is a framework for expanding OpenBSD's [[https://man.openbsd.org/ksh][ksh]]. It offers:
- completions :: for common things like [[https://man.openbsd.org/man][man]] pages, [[https://man.openbsd.org/ssh][ssh]] known_hosts and git
commands.
- extensions :: to import bulk functionality, including git-prompt, OpenBSD
specific tooling, disabling color.. etc.
- prompts :: a decent selection of useful prompts.
** Completions
| Name | Completes |
|------+------------------------|
2020-07-16 08:26:50 -06:00
| git | add, fetch... |
| gopass | audit, config... |
| man | man pages |
| rc | OpenBSD rc scripts and rc commands |
| ssh | ssh known hosts |
| vmd | vmctl commands and VM names |
2020-07-15 16:28:24 -06:00
** Extensions
| Name | Description |
|------------+-----------------------------------------------------------|
| fonts | Load fonts from common locations. |
| fzf | - |
| git-prompt | A port of git-prompt for KSH. |
| k | A tool to quickly change directories. |
| nocolor | Disable terminal color options for many tools. |
| openbsd | A set of tools for working with the OpenBSD source trees. |
** Prompts
| Name | Example |
|------------+---------------------------|
| q | ~qbit@litr[0]:~$~ |
2020-07-16 08:13:08 -06:00
| og-openbsd | ~$~ |
2020-07-16 08:30:02 -06:00
** Example usage
#+begin_src shell
OHMYKSH_DIR=/home/qbit/src/ohmyksh
. ~${ONMYKSH_DIR}/ohmy.ksh
set -A my_paths -- \
/usr/ports/infrastructure/bin \
~/bin \
~/go/bin \
/usr/local/plan9/bin
paths "${my_paths[@]}"
load_extension fonts
load_extension fzf
load_extension git-prompt
load_extension k
load_extension nocolor
load_extension openbsd
#load_completion man
load_completion ssh
load_completion vmd
load_completion rc
load_completion gopass
load_completion git
alias vi=vim
set_prompt q
#+end_src