bash_completion - update filter path

This commit is contained in:
Ludovic Cartier 2024-11-08 16:19:50 +01:00
parent c7849945c3
commit 11e2cf9f8d

View File

@ -1,7 +1,7 @@
function _connect() { function _connect() {
COMPREPLY=() COMPREPLY=()
local currentWord=${COMP_WORDS[COMP_CWORD]} local currentWord=${COMP_WORDS[COMP_CWORD]}
local completeHosts=$(cat /etc/passwd|grep "/var/www/sites"|cut -d ':' -f 1) local completeHosts=$(cat /etc/passwd|grep "/var/www"|cut -d ':' -f 1)
COMPREPLY=($(compgen -W "$completeHosts" -- "$currentWord")) COMPREPLY=($(compgen -W "$completeHosts" -- "$currentWord"))
return 0 return 0