--- a/contrib/zsh_completion Tue Oct 31 15:48:02 2006 -0800
+++ b/contrib/zsh_completion Tue Oct 31 16:04:03 2006 -0800
@@ -190,7 +190,8 @@
typeset -a remdirs
compset -p $(( $#host + 1 ))
local rempath=${(M)PREFIX##*/}
- local cacheid="hg_${host}_${rempath//\//_}"
+ local cacheid="hg:${host}-${rempath//\//_}"
+ cacheid=${cacheid%[-_]}
compset -P '*/'
if _cache_invalid "$cacheid" || ! _retrieve_cache "$cacheid"
then
@@ -202,7 +203,13 @@
_message 'remote directory'
fi
else
- _hosts -S/
+ if compset -P '*@'
+ then
+ _hosts -S/
+ else
+ _alternative 'hosts:remote host name:_hosts -S/' \
+ 'users:user:_users -S@'
+ fi
fi
}