File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4949
5050 if [ -n " $special " ]; then
5151 # 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
5354 _filedir rpm
5455 return 0
5556 fi
Original file line number Diff line number Diff line change 99
1010 _expand || return 0
1111
12- # default completion if parameter contains /
13- if [[ " $cur " == * / * ]]; then
12+ # default completion if parameter looks like a path
13+ if [[ " $cur " == @ ( * / | [.~]) * ]]; then
1414 _filedir
1515 return 0
1616 fi
Original file line number Diff line number Diff line change 1919
2020 _expand || return 0
2121
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
2424 _filedir $manext
2525 return 0
2626 fi
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ _insmod()
3131 fi
3232
3333 # do filename completion if we're giving a path to a module
34- if [[ " $cur " == * / * ]]; then
34+ if [[ " $cur " == @ ( * / | [.~]) * ]]; then
3535 _filedir ' @(?(k)o?(.gz))'
3636 return 0
3737 fi
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ _perldoc()
113113 COMPREPLY=( $( compgen -W ' -h -v -t -u -m -l -F -X -f -q' -- " $cur " ) )
114114 else
115115 # return available modules (unless it is clearly a file)
116- if [[ " $cur " != * / * ]]; then
116+ if [[ " $cur " != @ ( * / | [.~]) * ]]; then
117117 _perlmodules $perl
118118 COMPREPLY+=( $( compgen -W \
119119 ' $( MANPAGER=/bin/cat PAGER=/bin/cat man perl | \
Original file line number Diff line number Diff line change @@ -374,8 +374,8 @@ _scp()
374374 COMPREPLY=( " ${COMPREPLY[@]/%/ } " )
375375 return 0
376376 ;;
377- * /* )
378- # pass through
377+ * /* |[.~] * )
378+ # not a known host, pass through
379379 ;;
380380 * )
381381 _known_hosts_real -c -a -F " $configfile " " $cur "
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ _sshfs()
1818 return 0
1919 fi
2020
21- [[ " $cur " == * / * ]] || _known_hosts_real -c -a " $cur "
21+ [[ " $cur " == @ ( * / | [.~]) * ]] || _known_hosts_real -c -a " $cur "
2222
2323 declare -F _scp_local_files & > /dev/null && _scp_local_files -d
2424
You can’t perform that action at this time.
0 commit comments