Update ssh completion

This commit is contained in:
Jeremy Gardais 2022-11-02 17:11:43 +01:00
parent da2300b6da
commit 73811d30c8
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 2 additions and 1 deletions

3
zshrc
View File

@ -1864,12 +1864,13 @@ zstyle ':completion:*' list-colors ${(s.:.)LS_COLORS}
zstyle ':completion:*:*:cd:*' tag-order local-directories path-directories zstyle ':completion:*:*:cd:*' tag-order local-directories path-directories
## Complétion des commandes ssh avec le contenu du fichier ~/.ssh/config et le contenu de host ## Complétion des commandes ssh avec le contenu du fichier ~/.ssh/config et le contenu de host
local HOSTS #local HOSTS
#[[ -f ~/.ssh/config ]] && HOSTS=(`sed -n \'s/^Host \(.*\)/\1/p\' ~/.ssh/config`) #[[ -f ~/.ssh/config ]] && HOSTS=(`sed -n \'s/^Host \(.*\)/\1/p\' ~/.ssh/config`)
#if [ -f ~/.ssh/config ]; then #if [ -f ~/.ssh/config ]; then
#HOSTS=(`grep ^Host ~/.ssh/config | sed s/Host\ // | egrep -v ^\*$`) #HOSTS=(`grep ^Host ~/.ssh/config | sed s/Host\ // | egrep -v ^\*$`)
#fi #fi
#zstyle ':completion:*:(ssh|scp|sftp|sshfs):*' hosts ${HOSTS} #zstyle ':completion:*:(ssh|scp|sftp|sshfs):*' hosts ${HOSTS}
zstyle ':completion:*:hosts' hosts off
# Complétions pour certains programmes en fonction des extensions # Complétions pour certains programmes en fonction des extensions
zstyle ':completion:*:*:vlc:*' file-patterns '*.(mkv|MKV|avi|AVI|flv|FLV|mp4|MP4|webm|WEBM|mov|MOV|flac|FLAC|mp3|MP3|ogg|OGG|ogv|OGV|wmv|WMV)\ *(-/):directories' zstyle ':completion:*:*:vlc:*' file-patterns '*.(mkv|MKV|avi|AVI|flv|FLV|mp4|MP4|webm|WEBM|mov|MOV|flac|FLAC|mp3|MP3|ogg|OGG|ogv|OGV|wmv|WMV)\ *(-/):directories'