Skip to content

Instantly share code, notes, and snippets.

@un-def
Created January 13, 2020 18:52
Show Gist options
  • Save un-def/ee696955bf0fb85e7cf2fc32f26eaa34 to your computer and use it in GitHub Desktop.
Save un-def/ee696955bf0fb85e7cf2fc32f26eaa34 to your computer and use it in GitHub Desktop.
ohmyzsh just autocompletion
#compdef _just just
#autoload
_just() {
local -a subcmds
subcmds=($(just --summary)) 2> /dev/null || return 1
_describe 'command' subcmds
}
@un-def
Copy link
Author

un-def commented Jan 13, 2020

Installing

  1. Put _just in $ZSH/custom/plugins/just/
  2. Add just to your plugin list in ~/.zshrc:
plugins=(
    ....
    just
)
  1. Open a new shell, type just, press Tab, enjoy.

Troubleshooting

Try to remove ~/.zcompdump


Based on completion script by @peterkc, see casey/just#223 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment