zsh: better fix for partial completions
authorSteve Borho <steve@borho.org>
Tue, 12 Dec 2006 15:34:11 -0600
changeset 3878 729f354f3f09
parent 3874 e88d03c2a3d9
child 3879 ff49da8bd6ae
child 3880 5f05157bf9be
child 3882 9c8488490724
zsh: better fix for partial completions Properly handle relative paths followed by partial filenames hg add ../path/to/file/partial[TAB]
contrib/zsh_completion
--- a/contrib/zsh_completion	Tue Dec 12 12:40:51 2006 -0800
+++ b/contrib/zsh_completion	Tue Dec 12 15:34:11 2006 -0600
@@ -178,6 +178,7 @@
 }
 
 _hg_status() {
+  [[ -d $PREFIX ]] || PREFIX=$PREFIX:h
   status_files=(${(ps:\0:)"$(_hg_cmd status -0n$1 ./$PREFIX 2>/dev/null)"})
 }