diff --git a/hybris.completions b/hybris.completions index a66f168..b1212b3 100644 --- a/hybris.completions +++ b/hybris.completions @@ -1,15 +1,11 @@ -# Some completions +# Bookmarks completion using jump plugin compctl -K _completemarks j + +# Path completion on catwich compdef _path_commands catwhich -_complete_tramp() {reply=($(ls $INFRA/host && grep "^ [^ ]" ~/dev/robespierre/infra/hosts/all.yml | sed 's/^ *\(.*\):$/\1/'))} -compctl -K _complete_tramp tramp - -function _myssh(){ - # Add bearstech hosts - compadd $(ls $INFRA/host) - # Add own hosts - # compadd $(cat ~/dev/robespierre/infra/hosts/all.yml | grep "^ [^ ]" | sed 's/ *\(.*\):/\1/') -} +# Hostname completion on various ssh commands +function _myssh() {compadd $(ls $INFRA/host); compadd $(ls $ROBESPIERRE/ansible/inventory | sed 's/\.yml$//')} compdef _myssh r compdef _myssh ra +compdef _myssh tramp diff --git a/zshrc b/zshrc index 3641a24..6e86bdf 100644 --- a/zshrc +++ b/zshrc @@ -1,11 +1,10 @@ -############# -# Load zgen # -############# +# Load zgen source "${HOME}/.zgen/zgen.zsh" -####################################### -# Plugins and configuration generator # -####################################### +# Required for compdef calls to work +autoload -Uz compinit && compinit -C + +# Plugins and configuration generator if ! zgen saved; then # Configuration zgen load https://gitea.audin.me/hybris/zsh ${USER}.zsh