mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 21:44:11 +01:00
Initial revision
This commit is contained in:
parent
5c85a426d9
commit
2149b00fdb
14
Completion/User/_my_accounts
Normal file
14
Completion/User/_my_accounts
Normal file
@ -0,0 +1,14 @@
|
||||
#autoload
|
||||
|
||||
local expl nm="$compstate[nmatches]"
|
||||
local accounts_users_hosts
|
||||
|
||||
local varname="$words[1]_accounts"
|
||||
|
||||
if [[ ${(P)+varname} -eq 1 ]]; then
|
||||
accounts_users_hosts=( ${(P)varname} )
|
||||
else
|
||||
accounts_users_hosts=( $my_accounts )
|
||||
fi
|
||||
|
||||
_user@host
|
14
Completion/User/_other_accounts
Normal file
14
Completion/User/_other_accounts
Normal file
@ -0,0 +1,14 @@
|
||||
#compdef ytalk finger
|
||||
|
||||
local expl nm="$compstate[nmatches]"
|
||||
local accounts_users_hosts
|
||||
|
||||
local varname="$words[1]_accounts"
|
||||
|
||||
if [[ ${(P)+varname} -eq 1 ]]; then
|
||||
accounts_users_hosts=( ${(P)varname} )
|
||||
else
|
||||
accounts_users_hosts=( $other_accounts )
|
||||
fi
|
||||
|
||||
_user@host
|
11
Completion/User/_users_on
Normal file
11
Completion/User/_users_on
Normal file
@ -0,0 +1,11 @@
|
||||
#autoload write
|
||||
|
||||
local expl
|
||||
|
||||
if which users >/dev/null; then
|
||||
_description expl users logged on
|
||||
compadd "$@" "$expl[@]" - $(users) && return 0
|
||||
else
|
||||
# Other methods of finding out users logged on should be added here
|
||||
return 1
|
||||
fi
|
Loading…
Reference in New Issue
Block a user