File tree 7 files changed +11
-10
lines changed
7 files changed +11
-10
lines changed Original file line number Diff line number Diff line change 49
49
50
50
if [ -n " $special " ]; then
51
51
# TODO: install|update|upgrade should not match *src.rpm
52
- if [[ " $cur " == * /* && " $special " == @ (deplist| install| update| upgrade) ]]; then
52
+ if [[ " $cur " == @ (* /| [.~])* && \
53
+ " $special " == @ (deplist| install| update| upgrade) ]]; then
53
54
_filedir rpm
54
55
return 0
55
56
fi
Original file line number Diff line number Diff line change 9
9
10
10
_expand || return 0
11
11
12
- # default completion if parameter contains /
13
- if [[ " $cur " == * / * ]]; then
12
+ # default completion if parameter looks like a path
13
+ if [[ " $cur " == @ ( * / | [.~]) * ]]; then
14
14
_filedir
15
15
return 0
16
16
fi
Original file line number Diff line number Diff line change 19
19
20
20
_expand || return 0
21
21
22
- # file based completion if parameter contains /
23
- if [[ " $cur " == * / * ]]; then
22
+ # file based completion if parameter looks like a path
23
+ if [[ " $cur " == @ ( * / | [.~]) * ]]; then
24
24
_filedir $manext
25
25
return 0
26
26
fi
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ _insmod()
31
31
fi
32
32
33
33
# do filename completion if we're giving a path to a module
34
- if [[ " $cur " == * / * ]]; then
34
+ if [[ " $cur " == @ ( * / | [.~]) * ]]; then
35
35
_filedir ' @(?(k)o?(.gz))'
36
36
return 0
37
37
fi
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ _perldoc()
113
113
COMPREPLY=( $( compgen -W ' -h -v -t -u -m -l -F -X -f -q' -- " $cur " ) )
114
114
else
115
115
# return available modules (unless it is clearly a file)
116
- if [[ " $cur " != * / * ]]; then
116
+ if [[ " $cur " != @ ( * / | [.~]) * ]]; then
117
117
_perlmodules $perl
118
118
COMPREPLY+=( $( compgen -W \
119
119
' $( MANPAGER=/bin/cat PAGER=/bin/cat man perl | \
Original file line number Diff line number Diff line change @@ -374,8 +374,8 @@ _scp()
374
374
COMPREPLY=( " ${COMPREPLY[@]/%/ } " )
375
375
return 0
376
376
;;
377
- * /* )
378
- # pass through
377
+ * /* |[.~] * )
378
+ # not a known host, pass through
379
379
;;
380
380
* )
381
381
_known_hosts_real -c -a -F " $configfile " " $cur "
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ _sshfs()
18
18
return 0
19
19
fi
20
20
21
- [[ " $cur " == * / * ]] || _known_hosts_real -c -a " $cur "
21
+ [[ " $cur " == @ ( * / | [.~]) * ]] || _known_hosts_real -c -a " $cur "
22
22
23
23
declare -F _scp_local_files & > /dev/null && _scp_local_files -d
24
24
You can’t perform that action at this time.
0 commit comments