Skip to content

Commit add4e3c

Browse files
committed
info, man, rsync: Defer _expand invocation
1 parent 6365265 commit add4e3c

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

completions/info

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ _info()
55
local cur prev words cword split
66
_init_completion -s || return
77

8-
_expand || return
9-
108
# default completion if parameter looks like a path
119
if [[ "$cur" == @(*/|[.~])* ]]; then
1210
_filedir
@@ -49,6 +47,8 @@ _info()
4947
infopath=$INFOPATH
5048
fi
5149

50+
_expand || return
51+
5252
infopath=$infopath:
5353
if [[ -n $cur ]]; then
5454
infopath="${infopath//://$cur* }"

completions/man

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ _man()
4545
return
4646
fi
4747

48-
_expand || return
49-
5048
# file based completion if parameter looks like a path
5149
if [[ "$cur" == @(*/|[.~])* ]]; then
5250
_filedir "$manext"
@@ -60,6 +58,8 @@ _man()
6058
local sect
6159
[[ "$prev" == $mansect ]] && sect=$prev || sect='*'
6260

61+
_expand || return
62+
6363
manpath=$manpath:
6464
if [[ -n $cur ]]; then
6565
manpath="${manpath//://*man$sect/$cur* } ${manpath//://*cat$sect/$cur* }"

completions/rsync

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ _rsync()
55
local cur prev words cword split
66
_init_completion -s -n : || return
77

8-
_expand || return
9-
108
case $prev in
119
--config|--password-file|--include-from|--exclude-from|--files-from|\
1210
--log-file|--write-batch|--only-write-batch|--read-batch)
@@ -34,6 +32,8 @@ _rsync()
3432

3533
$split && return
3634

35+
_expand || return
36+
3737
case $cur in
3838
-*)
3939
COMPREPLY=( $( compgen -W '--verbose --quiet --no-motd --checksum

0 commit comments

Comments
 (0)