- cd should also complete on variable names if cdable_vars is set
This commit is contained in:
parent
e72a58a790
commit
20fdc452ab
@ -1,6 +1,6 @@
|
|||||||
# bash_completion - some programmable completion functions for bash 2.05b
|
# bash_completion - some programmable completion functions for bash 2.05b
|
||||||
#
|
#
|
||||||
# $Id: bash_completion,v 1.508 2003/01/13 03:28:28 ianmacd Exp $
|
# $Id: bash_completion,v 1.509 2003/01/13 03:30:37 ianmacd Exp $
|
||||||
#
|
#
|
||||||
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
# Copyright (C) Ian Macdonald <ian@caliban.org>
|
||||||
#
|
#
|
||||||
@ -2306,7 +2306,11 @@ _cd()
|
|||||||
|
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
if shopt -q cdable_vars; then
|
||||||
|
complete -A variable -F _cd $nospace $filenames cd
|
||||||
|
else
|
||||||
complete -F _cd $nospace $filenames cd
|
complete -F _cd $nospace $filenames cd
|
||||||
|
fi
|
||||||
|
|
||||||
# A meta-command completion function for commands like sudo(8), which need to
|
# A meta-command completion function for commands like sudo(8), which need to
|
||||||
# first complete on a command, then complete according to that command's own
|
# first complete on a command, then complete according to that command's own
|
||||||
|
Loading…
x
Reference in New Issue
Block a user