# HG changeset patch # User Brendan Cully # Date 1162339443 28800 # Node ID ec221317e018d1bebeb033cafd8f34afd6374903 # Parent cedf056bb7236e618c1b97a9cd5328e2cd273b5c zsh: complete users in ssh URLS diff -r cedf056bb723 -r ec221317e018 contrib/zsh_completion --- 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 }