changeset 3875:729f354f3f09

zsh: better fix for partial completions Properly handle relative paths followed by partial filenames hg add ../path/to/file/partial[TAB]
author Steve Borho <steve@borho.org>
date Tue, 12 Dec 2006 15:34:11 -0600
parents e88d03c2a3d9
children ff49da8bd6ae 5f05157bf9be 9c8488490724
files contrib/zsh_completion
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/zsh_completion
+++ b/contrib/zsh_completion
@@ -178,6 +178,7 @@ typeset -A _hg_cmd_globals
 }
 
 _hg_status() {
+  [[ -d $PREFIX ]] || PREFIX=$PREFIX:h
   status_files=(${(ps:\0:)"$(_hg_cmd status -0n$1 ./$PREFIX 2>/dev/null)"})
 }