try once again to fix ssh completion...
This commit is contained in:
parent
95adf4dbd2
commit
757687059c
2 changed files with 11 additions and 16 deletions
|
|
@ -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
|
||||
|
|
|
|||
11
zshrc
11
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue