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
|
|
|
|
|
2020-07-19 08:07:12 -06:00
|
|
|
| Name | Completes |
|
|
|
|
|--------+------------------------------------|
|
|
|
|
| [[completions/git.org][git]] | add, fetch... |
|
|
|
|
| [[completions/gopass.org][gopass]] | audit, config... |
|
|
|
|
| [[completions/man.org][man]] | man pages |
|
|
|
|
| [[completions/rc.org][rc]] | OpenBSD rc scripts and rc commands |
|
|
|
|
| [[completions/ssh.org][ssh]] | ssh known hosts |
|
|
|
|
| [[completions/vmd.org][vmd]] | vmctl commands and VM names |
|
2020-07-15 16:28:24 -06:00
|
|
|
|
|
|
|
** Extensions
|
|
|
|
|
|
|
|
| Name | Description |
|
|
|
|
|------------+-----------------------------------------------------------|
|
2020-07-19 08:07:12 -06:00
|
|
|
| [[extensions/fonts.org][fonts]] | Load fonts from common locations. |
|
|
|
|
| [[extensions/fzf.org][fzf]] | - |
|
|
|
|
| [[extensions/git-prompt.org][git-prompt]] | A port of git-prompt for KSH. |
|
|
|
|
| [[extensions/k.org][k]] | A tool to quickly change directories. |
|
|
|
|
| [[extensions/nocolor.org][nocolor]] | Disable terminal color options for many tools. |
|
|
|
|
| [[extensions/openbsd.org][openbsd]] | A set of tools for working with the OpenBSD source trees. |
|
2020-07-15 16:28:24 -06:00
|
|
|
|
|
|
|
|
|
|
|
** Prompts
|
|
|
|
|
2020-07-19 08:07:12 -06:00
|
|
|
| Name | Example |
|
|
|
|
|------------+-------------------|
|
|
|
|
| [[prompts/q.org][q]] | ~qbit@litr[0]:~$~ |
|
|
|
|
| [[prompts/og-openbsd.org][og-openbsd]] | ~$~ |
|
2020-07-16 08:30:02 -06:00
|
|
|
|
|
|
|
** Example usage
|
|
|
|
|
|
|
|
#+begin_src shell
|
|
|
|
OHMYKSH_DIR=/home/qbit/src/ohmyksh
|
2020-07-19 07:36:56 -06:00
|
|
|
. ~${OHMYKSH_DIR}/ohmy.ksh
|
2020-07-16 08:30:02 -06:00
|
|
|
|
|
|
|
set -A my_paths -- \
|
|
|
|
/usr/ports/infrastructure/bin \
|
|
|
|
~/bin \
|
|
|
|
~/go/bin \
|
|
|
|
/usr/local/plan9/bin
|
|
|
|
|
|
|
|
paths "${my_paths[@]}"
|
|
|
|
|
|
|
|
load_extension fonts
|
|
|
|
load_extension k
|
|
|
|
load_extension nocolor
|
|
|
|
load_extension openbsd
|
|
|
|
|
|
|
|
load_completion ssh
|
|
|
|
load_completion vmd
|
|
|
|
load_completion rc
|
|
|
|
load_completion gopass
|
|
|
|
load_completion git
|
|
|
|
|
|
|
|
alias vi=vim
|
|
|
|
|
2020-07-19 07:37:05 -06:00
|
|
|
# the q prompt auto-loads the git-prompt extension
|
2020-07-16 08:30:02 -06:00
|
|
|
set_prompt q
|
|
|
|
#+end_src
|