From e6282df1155e8d9b08b2e518a452c1997973f1ce Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Fri, 12 Nov 1999 15:28:24 +0000 Subject: manual/8630 --- Completion/Builtins/_cd | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Completion/Builtins/_cd') diff --git a/Completion/Builtins/_cd b/Completion/Builtins/_cd index b407b5a85..26846fde2 100644 --- a/Completion/Builtins/_cd +++ b/Completion/Builtins/_cd @@ -22,10 +22,13 @@ if [[ CURRENT -eq 3 ]]; then rep=(${~PWD/$words[2]/*}~$PWD(-/N)) # Now remove all the common parts of $PWD and the completions from this rep=(${${rep#${PWD%%$words[2]*}}%${PWD#*$words[2]}}) - _description expl replacement - (( ! $#rep )) || compadd "$expl[@]" $rep + if (( $#rep )) && _tags replacement strings; then + _description expl replacement + compadd "$expl[@]" $rep + fi elif _popd || [[ $PREFIX != (\~|/|./|../)* && $#cdpath -ne 0 ]]; then local tdir tdir2 + # With cdablevars, we can convert foo/bar/... to ~foo/bar/... if # there is no directory foo. In that case we could also complete # variable names, but it hardly seems worth it. -- cgit 1.4.1