try once again to fix ssh completion...

This commit is contained in:
2022-11-09 16:18:34 +01:00
parent 95adf4dbd2
commit 757687059c
2 changed files with 11 additions and 16 deletions

View File

@@ -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