Skip to content

qbit/ohmyksh

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

78 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

NameCompletes
gitadd, fetch…
gotadd, blame…
gopassaudit, config…
manman pages
mpcplay, load, toggle…
rcOpenBSD rc scripts and rc commands
sshssh known hosts
vmdvmctl commands and VM names
ogvtreminders for ogvt (-pub, -sig, -file)

Extensions

NameDescription
fontsLoad fonts from common locations.
fzfSet of interactive wrappers for things like packages and shell history.
git-promptA port of git-prompt for KSH.
gotAdds PS1 support for got, as well as a few helper functions.
kA tool to quickly change directories.
keychainWrapper for Funtoo’s Keychain utility.
nocolorDisable terminal color options for many tools.
openbsdA set of tools for working with the OpenBSD source trees.
pkgupUtility to speed up OpenBSD’ pkg_add(1).

Prompts

NameExampleExtensions used
qqbit@litr[0]:~$git-prompt, got
plainlitr:~/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/[email protected].

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.

About

A framework for OpenBSD's ksh

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •