blob: 2b8fdd2875d060ad318fc726a6f10c9df22dca6b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
#compdef rlogin rsh remsh rcp
case "$words[1]" in
rlogin)
_arguments -s \
'-8[allow 8-Bit data]' \
'-e-[specify escape character]:escape character:' \
'-l[specify login user name]:login as:_users' \
':remote host name:_hosts'
;;
rsh|remsh)
local state line ret=1
typeset -A options
_arguments -s \
'-n[ignore stdin]' \
'-l[specify login user name]:login as:_users' \
':remote host name:_hosts' \
':command: _command_names -e' \
'*::command:->command' && ret=0
if [[ -n "$state" ]]; then
shift 1 words
(( CURRENT-- ))
_normal && ret=0
fi
return ret
;;
rcp)
local state line ret=1
typeset -A options
_arguments -s \
'-p[preserve modification times]' \
'-r[recursively copy directories]' \
'*:files:->files' && ret=0
if [[ -n "$state" ]]; then
if compset -P '*:'; then
_files && ret=0
elif compset -P '*@'; then
_hosts -S: && ret=0
else
_files && ret=0
_hosts -S: && ret=0
_users -S@ && ret=0
fi
fi
return ret
;;
esac
|