# HG changeset patch # User Steve Borho # Date 2006-12-12 21:34:11 # Node ID 729f354f3f09eb3c6e976eeef17f5a2fa9cd30d1 # Parent e88d03c2a3d95ae6865749e3686e1786e15a3505 zsh: better fix for partial completions Properly handle relative paths followed by partial filenames hg add ../path/to/file/partial[TAB] diff --git a/contrib/zsh_completion b/contrib/zsh_completion --- 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)"}) }