#+TITLE: ohmyksh * 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 (and got!) 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 | |--------+------------------------------------| | [[file:completions/git.org][git]] | add, fetch... | | [[file:completions/got.org][got]] | add, blame... | | [[file:completions/gopass.org][gopass]] | audit, config... | | [[file:completions/man.org][man]] | man pages | | [[file:completions/mpc.org][mpc]] | play, load, toggle... | | [[file:completions/rc.org][rc]] | OpenBSD rc scripts and rc commands | | [[file:completions/ssh.org][ssh]] | ssh known hosts | | [[file:completions/vmd.org][vmd]] | vmctl commands and VM names | ** Extensions | Name | Description | |------------+--------------------------------------------------------------| | [[file:extensions/fonts.org][fonts]] | Load fonts from common locations. | | [[file:extensions/fzf.org][fzf]] | - | | [[file:extensions/git-prompt.org][git-prompt]] | A port of git-prompt for KSH. | | [[file:extensions/got.org][got]] | Adds PS1 support for got, as well as a few helper functions. | | [[file:extensions/k.org][k]] | A tool to quickly change directories. | | [[file:extensions/nocolor.org][nocolor]] | Disable terminal color options for many tools. | | [[file:extensions/openbsd.org][openbsd]] | A set of tools for working with the OpenBSD source trees. | ** Prompts | Name | Example | Extensions used | |------------+--------------------------------+-----------------| | [[file:prompts/q.org][q]] | ~qbit@litr[0]:~$~ | git-prompt, got | | [[file:prompts/plain.org][plain]] | ~litr:~/src/ohmyksh/prompts$~ | - | | [[file:prompts/og-openbsd.org][og-openbsd]] | ~$~ | - | | [[file:prompts/9.org][9]] | ~%~ | - | ** Example usage #+begin_src shell OHMYKSH_DIR=${HOME}/src/ohmyksh . ${OHMYKSH_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 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 # the q prompt auto-loads the git-prompt extension set_prompt q #+end_src