From 44ee911749a56a1320e6f415d4c4da46d73bb884 Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Tue, 18 Apr 2000 15:09:40 +0000 Subject: fix completion after ~ (10812) --- Completion/Core/_path_files | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'Completion') diff --git a/Completion/Core/_path_files b/Completion/Core/_path_files index 1744c280b..10fe39869 100644 --- a/Completion/Core/_path_files +++ b/Completion/Core/_path_files @@ -170,7 +170,14 @@ if [[ "$pre[1]" = \~ ]]; then realpath="${userdirs[$linepath]%/}/" elif (( $+nameddirs[$linepath] )); then realpath="${nameddirs[$linepath]%/}/" - elif [[ "$linepath" = [-+][0-9]## ]]; then + elif [[ "$linepath" = ([-+]|)[0-9]## ]]; then + if [[ "$linepath" != [-+]* ]]; then + if [[ -o pushdminus ]]; then + linepath="-$linepath" + else + linepath="+$linepath" + fi + fi if [[ "$linepath" = -* ]]; then tmp=$(( $#dirstack $linepath )) else -- cgit 1.4.1