Make mkdir complete only on dirs.
This commit is contained in:
parent
049e32ae66
commit
1b248b5502
4
CHANGES
4
CHANGES
@ -14,8 +14,8 @@ bash-completion (2.x)
|
||||
* Add *.gif (Alioth: #312512), *.m2t (Alioth: #312770), *.3gpp, *.3gpp2,
|
||||
and *.awb to mplayer filename completions.
|
||||
* Add "short" tarball extensions to unxz, unlzma etc completions.
|
||||
* Improve /etc/init.d/*, ipmitool, jar, mencoder, mplayer, povray, sqlite3,
|
||||
wodim, and general help parsing completions.
|
||||
* Improve /etc/init.d/*, ipmitool, jar, mencoder, mkdir, mplayer, povray,
|
||||
sqlite3, wodim, and general help parsing completions.
|
||||
* Fix p4 and povray completions (Alioth: #312625).
|
||||
* Add *.xsd, *.xsl, *.rng, and *.wsdl to xmllint filename completions.
|
||||
* Recognize rpm query mode based on the --file, --group, --package, and
|
||||
|
@ -1507,7 +1507,7 @@ _longopt()
|
||||
COMPREPLY=( $( compgen -W "$( $1 --help 2>&1 | \
|
||||
sed -ne 's/.*\(--[-A-Za-z0-9]\{1,\}\).*/\1/p' | sort -u )" \
|
||||
-- "$cur" ) )
|
||||
elif [[ "$1" == rmdir ]]; then
|
||||
elif [[ "$1" == @(mk|rm)dir ]]; then
|
||||
_filedir -d
|
||||
else
|
||||
_filedir
|
||||
|
@ -17,4 +17,10 @@ assert_complete_any "mkdir "
|
||||
sync_after_int
|
||||
|
||||
|
||||
assert_complete {"bar bar.d/" foo.d/} "mkdir fixtures/shared/default/"
|
||||
|
||||
|
||||
sync_after_int
|
||||
|
||||
|
||||
teardown
|
||||
|
Loading…
x
Reference in New Issue
Block a user