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) --- ChangeLog | 4 ++++ Completion/Core/_path_files | 9 ++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ed600dffc..763553d01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2000-04-18 Sven Wischnowsky + + * 10812: Completion/Core/_path_files: fix completion after ~ + 2000-04-18 Peter Stephenson * 10808: Completion/Core/compinstall: handle list-prompt. 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