diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-04-18 15:09:40 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-04-18 15:09:40 +0000 |
commit | 44ee911749a56a1320e6f415d4c4da46d73bb884 (patch) | |
tree | 7a660cf3447231a88d008da36e1f625dfa17bc87 | |
parent | 9941ddd984c479bcb649f89ce62f282c0f9e6e64 (diff) | |
download | zsh-44ee911749a56a1320e6f415d4c4da46d73bb884.tar.gz zsh-44ee911749a56a1320e6f415d4c4da46d73bb884.tar.xz zsh-44ee911749a56a1320e6f415d4c4da46d73bb884.zip |
fix completion after ~<num> (10812)
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | Completion/Core/_path_files | 9 |
2 files changed, 12 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog index ed600dffc..763553d01 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2000-04-18 Sven Wischnowsky <wischnow@informatik.hu-berlin.de> + + * 10812: Completion/Core/_path_files: fix completion after ~<num> + 2000-04-18 Peter Stephenson <pws@cambridgesiliconradio.com> * 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 |