blob: 028687fd13a30f362f876cf2d65e4cdf9fd56ba3 (
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
|
#compdef -command-line-
local _comp_command1 _comp_command2 skip
if [[ "$1" = -s ]]; then
skip=(-s)
else
skip=()
_compskip=''
fi
# Completing in command position?
if [[ CURRENT -eq 1 ]]; then
curcontext="${curcontext%:*:*}:-command-:"
comp="$_comps[-command-]"
[[ -n "$comp" ]] && eval "$comp" && ret=0
return ret
fi
_set_command
_dispatch -d "$skip[@]" comps "$_comp_command1" "$_comp_command2"
|