feat: Suppression completion ssh obsolete

This commit is contained in:
Xavier Logerais
2024-06-28 09:44:32 +00:00
parent 84ffaf33d2
commit a6905b9489
2 changed files with 1 additions and 19 deletions

View File

@ -1,10 +0,0 @@
#!/bin/bash
#SSH
if [ -e ~/.ssh/config ]; then
complete -W "$(cat ~/.ssh/config | egrep -i "^\s*host\s+[a-zA-Z]" | sed -e "s/^host\s*//i")" ssh
fi
if [ -e ~/.ssh/known_hosts ]; then
complete -W "$(cat ~/.ssh/known_hosts | cut -f 1 -d ' ' | sed -e s/,.*//g | uniq | grep -v "\[")" ssh
fi