# HG changeset patch # User Martin Geisler # Date 2009-06-30 21:40:03 # Node ID 080612b80c95c777924c141071421a2eab800719 # Parent 09c6735e388087841e21e443601e00b389fa1b07 # Parent 6d5dca8737b941d2685f6b656f9f1c2999a34f0c Merge with mpm diff --git a/contrib/zsh_completion b/contrib/zsh_completion --- a/contrib/zsh_completion +++ b/contrib/zsh_completion @@ -14,7 +14,7 @@ # compinit # # Copyright (C) 2005, 2006 Steve Borho -# Copyright (C) 2006, 2007, 2008 Brendan Cully +# Copyright (C) 2006-9 Brendan Cully # # Permission is hereby granted, without written agreement and without # licence or royalty fees, to use, copy, modify, and distribute this @@ -754,6 +754,18 @@ typeset -A _hg_cmd_globals (( $#patches )) && _describe -t hg-unapplied-patches 'unapplied patches' patches } +# unapplied, including guarded patches +_hg_qdeletable() { + typeset -a unapplied + unapplied=(${(f)"$(_hg_cmd qseries 2>/dev/null)"}) + for p in $(_hg_cmd qapplied 2>/dev/null) + do + unapplied=(${unapplied:#$p}) + done + + (( $#unapplied )) && _describe -t hg-allunapplied-patches 'all unapplied patches' unapplied +} + _hg_qguards() { typeset -a guards local guard @@ -776,7 +788,7 @@ typeset -A _hg_cmd_globals _arguments -s -w : $_hg_global_opts \ '(--keep -k)'{-k,--keep}'[keep patch file]' \ '*'{-r+,--rev}'[stop managing a revision]:applied patch:_hg_revrange' \ - '*:unapplied patch:_hg_qunapplied' + '*:unapplied patch:_hg_qdeletable' } _hg_cmd_qdiff() {