mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-16 23:16:48 +00:00
* gctcli: bump version * gctcli: flag alias done differenttttttttttttt * gctcli: add autocomplete scripts to folder within gctcli cmd folder structure
27 lines
646 B
Plaintext
27 lines
646 B
Plaintext
#compdef $PROG
|
|
|
|
# zsh programmable completion for gctcli
|
|
# For info on implementation for current shell session or persistence:
|
|
# https://github.com/urfave/cli/blob/master/docs/v2/manual.md#zsh-support
|
|
|
|
_gctcli() {
|
|
|
|
local -a opts
|
|
local cur
|
|
cur=${words[-1]}
|
|
if [[ "$cur" == "-"* ]]; then
|
|
opts=("${(@f)$(_CLI_ZSH_AUTOCOMPLETE_HACK=1 ${words[@]:0:#words[@]-1} ${cur} --generate-bash-completion)}")
|
|
else
|
|
opts=("${(@f)$(_CLI_ZSH_AUTOCOMPLETE_HACK=1 ${words[@]:0:#words[@]-1} --generate-bash-completion)}")
|
|
fi
|
|
|
|
if [[ "${opts[1]}" != "" ]]; then
|
|
_describe 'values' opts
|
|
else
|
|
_files
|
|
fi
|
|
|
|
return
|
|
}
|
|
|
|
compdef _gctcli $PROG |