=Completion support for cz alias
This commit is contained in:
parent
d34c3b15d6
commit
c14288eac0
|
@ -1 +1 @@
|
||||||
[[ -n "$BASH_COMPLETION_EXIST" && -n $(type -fP chezmoi) ]] && source <(chezmoi completion bash)
|
[[ -n "$BASH_COMPLETION_EXIST" && -n $(type -fP chezmoi) ]] && source <(chezmoi completion bash | add-alias-to-bash-completion-code cz )
|
||||||
|
|
|
@ -1,2 +1,6 @@
|
||||||
alias which-command="type -fP "
|
alias which-command="type -fP "
|
||||||
|
|
||||||
|
function add-alias-to-bash-completion-code() {
|
||||||
|
local CMD=$(printf "%s" "sed '" 's/\(complete\W.*-F\W.*chezmoi\)/\1 ' "$1/g'")
|
||||||
|
eval "$CMD"
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue