mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-22 16:20:23 +02:00
zsh-workers/8101
This commit is contained in:
parent
f5c25fe270
commit
c6257a5a71
3 changed files with 17 additions and 2 deletions
|
@ -10,4 +10,4 @@ else
|
|||
accounts_users_hosts=( $my_accounts )
|
||||
fi
|
||||
|
||||
_user@host "$@"
|
||||
_user_at_host "$@"
|
||||
|
|
|
@ -10,4 +10,4 @@ else
|
|||
accounts_users_hosts=( $other_accounts )
|
||||
fi
|
||||
|
||||
_user@host "$@"
|
||||
_user_at_host "$@"
|
||||
|
|
15
Completion/User/_user_at_host
Normal file
15
Completion/User/_user_at_host
Normal file
|
@ -0,0 +1,15 @@
|
|||
#autoload
|
||||
|
||||
local expl nm="$compstate[nmatches]"
|
||||
|
||||
if [[ -prefix 1 *@ ]]; then
|
||||
local user=${PREFIX/@}
|
||||
compset -P 1 '*@'
|
||||
_description expl "hostnames for $user"
|
||||
_combination accounts_users_hosts users="$user" hosts "$expl[@]" "$@"
|
||||
else
|
||||
_description expl "usernames"
|
||||
_combination accounts_users_hosts users -S@ -q "$expl[@]" "$@"
|
||||
fi
|
||||
|
||||
[[ nm -ne compstate[nmatches] ]]
|
Loading…
Add table
Add a link
Reference in a new issue