1
0
Fork
You've already forked ohmyksh
1
No description
  • Shell 98%
  • CSS 2%
2021年06月21日 14:16:02 +00:00
.static/css add ogvt completions 2021年03月15日 16:54:18 +00:00
completions remove check for mpd binary as it might be in a different location on a different system 2021年06月21日 14:16:02 +00:00
extensions add zpatch, a function to apply a patch file to cwd (lists files in $OHMYPATCHES) 2021年06月21日 14:13:58 +00:00
lib fix load function, does not depend on execution flag 2020年09月20日 09:41:48 +04:30
prompts flesh out docs 2021年03月11日 21:26:21 +00:00
.gitignore ignore cache 2020年07月16日 08:09:00 -06:00
LICENSE initial 2020年07月15日 16:28:24 -06:00
ohmy.ksh flesh out some more fzf features 2020年08月29日 02:58:09 +00:00
README.org fzf has a few features! 2021年03月20日 05:45:33 -06:00

ohmyksh

About

Have your cake and eat it too!

ohmyksh is a framework for expanding OpenBSD's ksh. It offers:

completions
for common things like man pages, 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, minimal prompts.

Completions

Name Completes
git add, fetch...
got add, blame...
gopass audit, config...
man man pages
mpc play, load, toggle...
rc OpenBSD rc scripts and rc commands
ssh ssh known hosts
vmd vmctl commands and VM names
ogvt reminders for ogvt (-pub, -sig, -file)

Extensions

Name Description
fonts Load fonts from common locations.
fzf Set of interactive wrappers for things like packages and shell history.
git-prompt A port of git-prompt for KSH.
got Adds PS1 support for got, as well as a few helper functions.
k A tool to quickly change directories.
keychain Wrapper for Funtoo's Keychain utility.
nocolor Disable terminal color options for many tools.
openbsd A set of tools for working with the OpenBSD source trees.
pkgup Utility to speed up OpenBSD' pkg_add(1).

Prompts

Name Example Extensions used
q qbit@litr[0]:~$ git-prompt, got
plain litr:~/src/ohmyksh/prompts$ -
og-openbsd $ -
9 % -

Example usage

 # ohmyksh needs to know where it lives, so we tell it via this env var:
 OHMYKSH_DIR=${HOME}/src/ohmyksh
 # Now we can load everything up!
 . ${OHMYKSH_DIR}/ohmy.ksh
 # All the paths we use (in order!)
 set -A my_paths -- \
 /usr/ports/infrastructure/bin \
 ~/bin \
 ~/go/bin \
 /usr/local/plan9/bin
 paths "${my_paths[@]}"
 # Load our various extensions
 load_extension fonts
 load_extension k
 load_extension nocolor
 load_extension openbsd
 # Load handy completions for various things
 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

Contributing

Contributions can be sent in via Github PRs or via emailing a patch to ~qbit/ohmyksh@lists.sr.ht.

If you do send in a contribution, please include a .org file which describes the feature set. The org syntax is available here, however, one will likely be able to just copy an existing file and modify it.