1
0
Fork 0

try once again to fix ssh completion...

This commit is contained in:
Maurice Audin 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 compctl -K _completemarks j
# Path completion on catwich
compdef _path_commands catwhich compdef _path_commands catwhich
_complete_tramp() {reply=($(ls $INFRA/host && grep "^ [^ ]" ~/dev/robespierre/infra/hosts/all.yml | sed 's/^ *\(.*\):$/\1/'))} # Hostname completion on various ssh commands
compctl -K _complete_tramp tramp function _myssh() {compadd $(ls $INFRA/host); compadd $(ls $ROBESPIERRE/ansible/inventory | sed 's/\.yml$//')}
function _myssh(){
# Add bearstech hosts
compadd $(ls $INFRA/host)
# Add own hosts
# compadd $(cat ~/dev/robespierre/infra/hosts/all.yml | grep "^ [^ ]" | sed 's/ *\(.*\):/\1/')
}
compdef _myssh r compdef _myssh r
compdef _myssh ra compdef _myssh ra
compdef _myssh tramp

11
zshrc
View file

@ -1,11 +1,10 @@
############# # Load zgen
# Load zgen #
#############
source "${HOME}/.zgen/zgen.zsh" source "${HOME}/.zgen/zgen.zsh"
####################################### # Required for compdef calls to work
# Plugins and configuration generator # autoload -Uz compinit && compinit -C
#######################################
# Plugins and configuration generator
if ! zgen saved; then if ! zgen saved; then
# Configuration # Configuration
zgen load https://gitea.audin.me/hybris/zsh ${USER}.zsh zgen load https://gitea.audin.me/hybris/zsh ${USER}.zsh