annotate .zfun/_hg @ 336:ea73ef5dc38c

emacs: avoid weird package.el breakage with newish packages I've been toting around this package.el from 2009 or so, and something in the package format seems to have changed that broke me. Thanks to some related diagnostics by Lucas, I've grabbed the last package.el that worked with emacs 23 and stashed it here. This seems to work, modulo some things (notably js2-mode and smex) now seem to require emacs 24 if you install them using package.el, so this will end up being brittle on my last couple of emacs23 machines.
author Augie Fackler <raf@durin42.com>
date Thu, 29 May 2014 14:30:42 -0400
parents 69ad773a1484
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
1 #compdef hg
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
2
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
3 # Zsh completion script for mercurial. Rename this file to _hg and copy
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
4 # it into your zsh function path (/usr/share/zsh/site-functions for
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
5 # instance)
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
6 #
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
7 # If you do not want to install it globally, you can copy it somewhere
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
8 # else and add that directory to $fpath. This must be done before
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
9 # compinit is called. If the file is copied to ~/.zsh.d, your ~/.zshrc
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
10 # file could look like this:
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
11 #
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
12 # fpath=("$HOME/.zsh.d" $fpath)
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
13 # autoload -U compinit
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
14 # compinit
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
15 #
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
16 # Copyright (C) 2005, 2006 Steve Borho <steve@borho.org>
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
17 # Copyright (C) 2006-10 Brendan Cully <brendan@kublai.com>
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
18 #
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
19 # Permission is hereby granted, without written agreement and without
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
20 # licence or royalty fees, to use, copy, modify, and distribute this
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
21 # software and to distribute modified versions of this software for any
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
22 # purpose, provided that the above copyright notice and the following
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
23 # two paragraphs appear in all copies of this software.
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
24 #
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
25 # In no event shall the authors be liable to any party for direct,
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
26 # indirect, special, incidental, or consequential damages arising out of
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
27 # the use of this software and its documentation, even if the authors
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
28 # have been advised of the possibility of such damage.
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
29 #
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
30 # The authors specifically disclaim any warranties, including, but not
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
31 # limited to, the implied warranties of merchantability and fitness for
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
32 # a particular purpose. The software provided hereunder is on an "as
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
33 # is" basis, and the authors have no obligation to provide maintenance,
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
34 # support, updates, enhancements, or modifications.
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
35
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
36 emulate -LR zsh
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
37 setopt extendedglob
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
38
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
39 local curcontext="$curcontext" state line
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
40 typeset -A _hg_cmd_globals
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
41
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
42 _hg() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
43 local cmd _hg_root
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
44 integer i=2
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
45 _hg_cmd_globals=()
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
46
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
47 while (( i < $#words ))
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
48 do
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
49 case "$words[$i]" in
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
50 -R|--repository)
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
51 eval _hg_root="$words[$i+1]"
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
52 _hg_cmd_globals+=("$words[$i]" "$_hg_root")
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
53 (( i += 2 ))
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
54 continue
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
55 ;;
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
56 -R*)
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
57 _hg_cmd_globals+="$words[$i]"
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
58 eval _hg_root="${words[$i]#-R}"
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
59 (( i++ ))
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
60 continue
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
61 ;;
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
62 --cwd|--config)
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
63 # pass along arguments to hg completer
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
64 _hg_cmd_globals+=("$words[$i]" "$words[$i+1]")
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
65 (( i += 2 ))
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
66 continue
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
67 ;;
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
68 -*)
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
69 # skip option
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
70 (( i++ ))
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
71 continue
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
72 ;;
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
73 esac
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
74 if [[ -z "$cmd" ]]
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
75 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
76 cmd="$words[$i]"
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
77 words[$i]=()
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
78 (( CURRENT-- ))
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
79 fi
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
80 (( i++ ))
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
81 done
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
82
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
83 if [[ -z "$cmd" ]]
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
84 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
85 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
86 ':mercurial command:_hg_commands'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
87 return
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
88 fi
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
89
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
90 # resolve abbreviations and aliases
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
91 if ! (( $+functions[_hg_cmd_${cmd}] ))
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
92 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
93 local cmdexp
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
94 (( $#_hg_cmd_list )) || _hg_get_commands
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
95
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
96 cmdexp=$_hg_cmd_list[(r)${cmd}*]
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
97 if [[ $cmdexp == $_hg_cmd_list[(R)${cmd}*] ]]
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
98 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
99 # might be nice to rewrite the command line with the expansion
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
100 cmd="$cmdexp"
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
101 fi
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
102 if [[ -n $_hg_alias_list[$cmd] ]]
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
103 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
104 cmd=$_hg_alias_list[$cmd]
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
105 fi
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
106 fi
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
107
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
108 curcontext="${curcontext%:*:*}:hg-${cmd}:"
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
109
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
110 zstyle -s ":completion:$curcontext:" cache-policy update_policy
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
111
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
112 if [[ -z "$update_policy" ]]
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
113 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
114 zstyle ":completion:$curcontext:" cache-policy _hg_cache_policy
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
115 fi
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
116
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
117 if (( $+functions[_hg_cmd_${cmd}] ))
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
118 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
119 _hg_cmd_${cmd}
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
120 else
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
121 # complete unknown commands normally
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
122 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
123 '*:files:_hg_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
124 fi
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
125 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
126
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
127 _hg_cache_policy() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
128 typeset -a old
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
129
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
130 # cache for a minute
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
131 old=( "$1"(mm+10) )
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
132 (( $#old )) && return 0
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
133
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
134 return 1
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
135 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
136
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
137 _hg_get_commands() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
138 typeset -ga _hg_cmd_list
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
139 typeset -gA _hg_alias_list
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
140 local hline cmd cmdalias
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
141
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
142 _call_program hg hg debugcomplete -v | while read -A hline
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
143 do
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
144 cmd=$hline[1]
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
145 _hg_cmd_list+=($cmd)
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
146
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
147 for cmdalias in $hline[2,-1]
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
148 do
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
149 _hg_cmd_list+=($cmdalias)
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
150 _hg_alias_list+=($cmdalias $cmd)
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
151 done
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
152 done
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
153 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
154
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
155 _hg_commands() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
156 (( $#_hg_cmd_list )) || _hg_get_commands
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
157 _describe -t commands 'mercurial command' _hg_cmd_list
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
158 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
159
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
160 _hg_revrange() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
161 compset -P 1 '*:'
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
162 _hg_labels "$@"
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
163 }
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
164
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
165 _hg_labels() {
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
166 _hg_tags "$@"
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
167 _hg_bookmarks "$@"
270
1e2125a577da _hg: import updated version from upstream
Augie Fackler <durin42@gmail.com>
parents: 240
diff changeset
168 _hg_branches "$@"
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
169 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
170
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
171 _hg_tags() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
172 typeset -a tags
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
173 local tag rev
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
174
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
175 _hg_cmd tags | while read tag
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
176 do
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
177 tags+=(${tag/ # [0-9]#:*})
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
178 done
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
179 (( $#tags )) && _describe -t tags 'tags' tags
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
180 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
181
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
182 _hg_bookmarks() {
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
183 typeset -a bookmark bookmarks
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
184
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
185 _hg_cmd bookmarks | while read -A bookmark
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
186 do
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
187 if test -z ${bookmark[-1]:#[0-9]*}
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
188 then
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
189 bookmarks+=($bookmark[-2])
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
190 fi
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
191 done
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
192 (( $#bookmarks )) && _describe -t bookmarks 'bookmarks' bookmarks
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
193 }
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
194
270
1e2125a577da _hg: import updated version from upstream
Augie Fackler <durin42@gmail.com>
parents: 240
diff changeset
195 _hg_branches() {
1e2125a577da _hg: import updated version from upstream
Augie Fackler <durin42@gmail.com>
parents: 240
diff changeset
196 typeset -a branches
1e2125a577da _hg: import updated version from upstream
Augie Fackler <durin42@gmail.com>
parents: 240
diff changeset
197 local branch
1e2125a577da _hg: import updated version from upstream
Augie Fackler <durin42@gmail.com>
parents: 240
diff changeset
198
1e2125a577da _hg: import updated version from upstream
Augie Fackler <durin42@gmail.com>
parents: 240
diff changeset
199 _hg_cmd branches | while read branch
1e2125a577da _hg: import updated version from upstream
Augie Fackler <durin42@gmail.com>
parents: 240
diff changeset
200 do
1e2125a577da _hg: import updated version from upstream
Augie Fackler <durin42@gmail.com>
parents: 240
diff changeset
201 branches+=(${branch/ # [0-9]#:*})
1e2125a577da _hg: import updated version from upstream
Augie Fackler <durin42@gmail.com>
parents: 240
diff changeset
202 done
1e2125a577da _hg: import updated version from upstream
Augie Fackler <durin42@gmail.com>
parents: 240
diff changeset
203 (( $#branches )) && _describe -t branches 'branches' branches
1e2125a577da _hg: import updated version from upstream
Augie Fackler <durin42@gmail.com>
parents: 240
diff changeset
204 }
1e2125a577da _hg: import updated version from upstream
Augie Fackler <durin42@gmail.com>
parents: 240
diff changeset
205
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
206 # likely merge candidates
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
207 _hg_mergerevs() {
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
208 typeset -a heads
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
209 local myrev
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
210
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
211 heads=(${(f)"$(_hg_cmd heads --template '{rev}\\n')"})
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
212 # exclude own revision
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
213 myrev=$(_hg_cmd log -r . --template '{rev}\\n')
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
214 heads=(${heads:#$myrev})
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
215
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
216 (( $#heads )) && _describe -t heads 'heads' heads
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
217 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
218
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
219 _hg_files() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
220 if [[ -n "$_hg_root" ]]
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
221 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
222 [[ -d "$_hg_root/.hg" ]] || return
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
223 case "$_hg_root" in
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
224 /*)
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
225 _files -W $_hg_root
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
226 ;;
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
227 *)
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
228 _files -W $PWD/$_hg_root
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
229 ;;
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
230 esac
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
231 else
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
232 _files
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
233 fi
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
234 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
235
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
236 _hg_status() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
237 [[ -d $PREFIX ]] || PREFIX=$PREFIX:h
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
238 status_files=(${(ps:\0:)"$(_hg_cmd status -0n$1 ./$PREFIX)"})
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
239 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
240
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
241 _hg_unknown() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
242 typeset -a status_files
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
243 _hg_status u
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
244 _wanted files expl 'unknown files' _multi_parts / status_files
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
245 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
246
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
247 _hg_missing() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
248 typeset -a status_files
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
249 _hg_status d
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
250 _wanted files expl 'missing files' _multi_parts / status_files
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
251 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
252
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
253 _hg_modified() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
254 typeset -a status_files
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
255 _hg_status m
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
256 _wanted files expl 'modified files' _multi_parts / status_files
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
257 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
258
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
259 _hg_resolve() {
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
260 local rstate rpath
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
261
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
262 [[ -d $PREFIX ]] || PREFIX=$PREFIX:h
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
263
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
264 _hg_cmd resolve -l ./$PREFIX | while read rstate rpath
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
265 do
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
266 [[ $rstate == 'R' ]] && resolved_files+=($rpath)
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
267 [[ $rstate == 'U' ]] && unresolved_files+=($rpath)
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
268 done
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
269 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
270
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
271 _hg_resolved() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
272 typeset -a resolved_files unresolved_files
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
273 _hg_resolve
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
274 _wanted files expl 'resolved files' _multi_parts / resolved_files
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
275 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
276
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
277 _hg_unresolved() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
278 typeset -a resolved_files unresolved_files
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
279 _hg_resolve
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
280 _wanted files expl 'unresolved files' _multi_parts / unresolved_files
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
281 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
282
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
283 _hg_config() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
284 typeset -a items
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
285 items=(${${(%f)"$(_call_program hg hg showconfig)"}%%\=*})
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
286 (( $#items )) && _describe -t config 'config item' items
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
287 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
288
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
289 _hg_addremove() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
290 _alternative 'files:unknown files:_hg_unknown' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
291 'files:missing files:_hg_missing'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
292 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
293
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
294 _hg_ssh_urls() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
295 if [[ -prefix */ ]]
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
296 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
297 if zstyle -T ":completion:${curcontext}:files" remote-access
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
298 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
299 local host=${PREFIX%%/*}
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
300 typeset -a remdirs
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
301 compset -p $(( $#host + 1 ))
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
302 local rempath=${(M)PREFIX##*/}
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
303 local cacheid="hg:${host}-${rempath//\//_}"
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
304 cacheid=${cacheid%[-_]}
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
305 compset -P '*/'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
306 if _cache_invalid "$cacheid" || ! _retrieve_cache "$cacheid"
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
307 then
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
308 remdirs=(${${(M)${(f)"$(_call_program files ssh -a -x $host ls -1FL "${(q)rempath}")"}##*/}%/})
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
309 _store_cache "$cacheid" remdirs
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
310 fi
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
311 _describe -t directories 'remote directory' remdirs -S/
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
312 else
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
313 _message 'remote directory'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
314 fi
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
315 else
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
316 if compset -P '*@'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
317 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
318 _hosts -S/
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
319 else
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
320 _alternative 'hosts:remote host name:_hosts -S/' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
321 'users:user:_users -S@'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
322 fi
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
323 fi
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
324 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
325
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
326 _hg_urls() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
327 if compset -P bundle://
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
328 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
329 _files
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
330 elif compset -P ssh://
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
331 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
332 _hg_ssh_urls
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
333 elif [[ -prefix *: ]]
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
334 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
335 _urls
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
336 else
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
337 local expl
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
338 compset -S '[^:]*'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
339 _wanted url-schemas expl 'URL schema' compadd -S '' - \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
340 http:// https:// ssh:// bundle://
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
341 fi
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
342 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
343
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
344 _hg_paths() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
345 typeset -a paths pnames
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
346 _hg_cmd paths | while read -A pnames
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
347 do
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
348 paths+=($pnames[1])
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
349 done
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
350 (( $#paths )) && _describe -t path-aliases 'repository alias' paths
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
351 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
352
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
353 _hg_remote() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
354 _alternative 'path-aliases:repository alias:_hg_paths' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
355 'directories:directory:_files -/' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
356 'urls:URL:_hg_urls'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
357 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
358
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
359 _hg_clone_dest() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
360 _alternative 'directories:directory:_files -/' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
361 'urls:URL:_hg_urls'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
362 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
363
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
364 # Common options
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
365 _hg_global_opts=(
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
366 '(--repository -R)'{-R+,--repository}'[repository root directory]:repository:_files -/'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
367 '--cwd[change working directory]:new working directory:_files -/'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
368 '(--noninteractive -y)'{-y,--noninteractive}'[do not prompt, assume yes for any required answers]'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
369 '(--verbose -v)'{-v,--verbose}'[enable additional output]'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
370 '*--config[set/override config option]:defined config items:_hg_config'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
371 '(--quiet -q)'{-q,--quiet}'[suppress output]'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
372 '(--help -h)'{-h,--help}'[display help and exit]'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
373 '--debug[debug mode]'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
374 '--debugger[start debugger]'
270
1e2125a577da _hg: import updated version from upstream
Augie Fackler <durin42@gmail.com>
parents: 240
diff changeset
375 '--encoding[set the charset encoding]'
1e2125a577da _hg: import updated version from upstream
Augie Fackler <durin42@gmail.com>
parents: 240
diff changeset
376 '--encodingmode[set the charset encoding mode]'
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
377 '--lsprof[print improved command execution profile]'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
378 '--traceback[print traceback on exception]'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
379 '--time[time how long the command takes]'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
380 '--profile[profile]'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
381 '--version[output version information and exit]'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
382 )
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
383
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
384 _hg_pat_opts=(
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
385 '*'{-I+,--include}'[include names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
386 '*'{-X+,--exclude}'[exclude names matching the given patterns]:dir:_files -W $(_hg_cmd root) -/')
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
387
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
388 _hg_diff_opts=(
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
389 '(--text -a)'{-a,--text}'[treat all files as text]'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
390 '(--git -g)'{-g,--git}'[use git extended diff format]'
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
391 "--nodates[omit dates from diff headers]")
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
392
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
393 _hg_dryrun_opts=(
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
394 '(--dry-run -n)'{-n,--dry-run}'[do not perform actions, just print output]')
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
395
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
396 _hg_style_opts=(
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
397 '--style[display using template map file]:'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
398 '--template[display with template]:')
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
399
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
400 _hg_commit_opts=(
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
401 '(-m --message -l --logfile --edit -e)'{-e,--edit}'[edit commit message]'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
402 '(-e --edit -l --logfile --message -m)'{-m+,--message}'[use <text> as commit message]:message:'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
403 '(-e --edit -m --message --logfile -l)'{-l+,--logfile}'[read the commit message from <file>]:log file:_files')
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
404
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
405 _hg_remote_opts=(
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
406 '(--ssh -e)'{-e+,--ssh}'[specify ssh command to use]:'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
407 '--remotecmd[specify hg command to run on the remote side]:')
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
408
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
409 _hg_cmd() {
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
410 _call_program hg HGPLAIN=1 hg "$_hg_cmd_globals[@]" "$@" 2> /dev/null
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
411 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
412
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
413 _hg_cmd_add() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
414 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
415 '*:unknown files:_hg_unknown'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
416 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
417
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
418 _hg_cmd_addremove() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
419 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
420 '(--similarity -s)'{-s+,--similarity}'[guess renamed files by similarity (0<=s<=100)]:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
421 '*:unknown or missing files:_hg_addremove'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
422 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
423
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
424 _hg_cmd_annotate() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
425 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
426 '(--rev -r)'{-r+,--rev}'[annotate the specified revision]:revision:_hg_labels' \
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
427 '(--follow -f)'{-f,--follow}'[follow file copies and renames]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
428 '(--text -a)'{-a,--text}'[treat all files as text]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
429 '(--user -u)'{-u,--user}'[list the author]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
430 '(--date -d)'{-d,--date}'[list the date]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
431 '(--number -n)'{-n,--number}'[list the revision number (default)]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
432 '(--changeset -c)'{-c,--changeset}'[list the changeset]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
433 '*:files:_hg_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
434 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
435
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
436 _hg_cmd_archive() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
437 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
438 '--no-decode[do not pass files through decoders]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
439 '(--prefix -p)'{-p+,--prefix}'[directory prefix for files in archive]:' \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
440 '(--rev -r)'{-r+,--rev}'[revision to distribute]:revision:_hg_labels' \
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
441 '(--type -t)'{-t+,--type}'[type of distribution to create]:archive type:(files tar tbz2 tgz uzip zip)' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
442 '*:destination:_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
443 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
444
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
445 _hg_cmd_backout() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
446 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
447 '--merge[merge with old dirstate parent after backout]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
448 '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
449 '--parent[parent to choose when backing out merge]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
450 '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
451 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_labels' \
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
452 '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
453 '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files -g \*.txt'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
454 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
455
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
456 _hg_cmd_bisect() {
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
457 _arguments -s -w : $_hg_global_opts \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
458 '(-)'{-r,--reset}'[reset bisect state]' \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
459 '(--good -g --bad -b --skip -s --reset -r)'{-g,--good}'[mark changeset good]'::revision:_hg_labels \
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
460 '(--good -g --bad -b --skip -s --reset -r)'{-b,--bad}'[mark changeset bad]'::revision:_hg_labels \
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
461 '(--good -g --bad -b --skip -s --reset -r)'{-s,--skip}'[skip testing changeset]' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
462 '(--command -c --noupdate -U)'{-c+,--command}'[use command to check changeset state]':commands:_command_names \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
463 '(--command -c --noupdate -U)'{-U,--noupdate}'[do not update to target]'
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
464 }
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
465
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
466 _hg_cmd_bookmarks() {
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
467 _arguments -s -w : $_hg_global_opts \
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
468 '(--force -f)'{-f,--force}'[force]' \
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
469 '(--rev -r --delete -d --rename -m)'{-r+,--rev}'[revision]:revision:_hg_labels' \
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
470 '(--rev -r --delete -d --rename -m)'{-d,--delete}'[delete a given bookmark]' \
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
471 '(--rev -r --delete -d --rename -m)'{-m+,--rename}'[rename a given bookmark]:bookmark:_hg_bookmarks' \
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
472 ':bookmark:_hg_bookmarks'
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
473 }
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
474
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
475 _hg_cmd_branch() {
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
476 _arguments -s -w : $_hg_global_opts \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
477 '(--force -f)'{-f,--force}'[set branch name even if it shadows an existing branch]' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
478 '(--clean -C)'{-C,--clean}'[reset branch name to parent branch name]'
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
479 }
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
480
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
481 _hg_cmd_branches() {
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
482 _arguments -s -w : $_hg_global_opts \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
483 '(--active -a)'{-a,--active}'[show only branches that have unmerge heads]'
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
484 }
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
485
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
486 _hg_cmd_bundle() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
487 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
488 '(--force -f)'{-f,--force}'[run even when remote repository is unrelated]' \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
489 '(2)*--base[a base changeset to specify instead of a destination]:revision:_hg_labels' \
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
490 ':output file:_files' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
491 ':destination repository:_files -/'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
492 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
493
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
494 _hg_cmd_cat() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
495 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
496 '(--output -o)'{-o+,--output}'[print output to file with formatted name]:filespec:' \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
497 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_labels' \
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
498 '*:file:_hg_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
499 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
500
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
501 _hg_cmd_clone() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
502 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
503 '(--noupdate -U)'{-U,--noupdate}'[do not update the new working directory]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
504 '(--rev -r)'{-r+,--rev}'[a changeset you would like to have after cloning]:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
505 '--uncompressed[use uncompressed transfer (fast over LAN)]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
506 ':source repository:_hg_remote' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
507 ':destination:_hg_clone_dest'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
508 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
509
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
510 _hg_cmd_commit() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
511 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
512 '(--addremove -A)'{-A,--addremove}'[mark new/missing files as added/removed before committing]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
513 '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
514 '(--logfile -l)'{-l+,--logfile}'[read commit message from <file>]:log file:_files -g \*.txt' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
515 '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
516 '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
517 '*:file:_hg_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
518 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
519
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
520 _hg_cmd_copy() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
521 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
522 '(--after -A)'{-A,--after}'[record a copy that has already occurred]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
523 '(--force -f)'{-f,--force}'[forcibly copy over an existing managed file]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
524 '*:file:_hg_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
525 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
526
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
527 _hg_cmd_diff() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
528 typeset -A opt_args
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
529 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_diff_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
530 '*'{-r,--rev}'+[revision]:revision:_hg_revrange' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
531 '(--show-function -p)'{-p,--show-function}'[show which function each change is in]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
532 '(--ignore-all-space -w)'{-w,--ignore-all-space}'[ignore white space when comparing lines]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
533 '(--ignore-space-change -b)'{-b,--ignore-space-change}'[ignore changes in the amount of white space]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
534 '(--ignore-blank-lines -B)'{-B,--ignore-blank-lines}'[ignore changes whose lines are all blank]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
535 '*:file:->diff_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
536
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
537 if [[ $state == 'diff_files' ]]
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
538 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
539 if [[ -n $opt_args[-r] ]]
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
540 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
541 _hg_files
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
542 else
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
543 _hg_modified
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
544 fi
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
545 fi
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
546 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
547
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
548 _hg_cmd_export() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
549 _arguments -s -w : $_hg_global_opts $_hg_diff_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
550 '(--outout -o)'{-o+,--output}'[print output to file with formatted name]:filespec:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
551 '--switch-parent[diff against the second parent]' \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
552 '*:revision:_hg_labels'
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
553 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
554
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
555 _hg_cmd_grep() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
556 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
557 '(--print0 -0)'{-0,--print0}'[end filenames with NUL]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
558 '--all[print all revisions with matches]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
559 '(--follow -f)'{-f,--follow}'[follow changeset or file history]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
560 '(--ignore-case -i)'{-i,--ignore-case}'[ignore case when matching]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
561 '(--files-with-matches -l)'{-l,--files-with-matches}'[print only filenames and revs that match]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
562 '(--line-number -n)'{-n,--line-number}'[print matching line numbers]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
563 '*'{-r+,--rev}'[search in given revision range]:revision:_hg_revrange' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
564 '(--user -u)'{-u,--user}'[print user who committed change]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
565 '1:search pattern:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
566 '*:files:_hg_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
567 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
568
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
569 _hg_cmd_heads() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
570 _arguments -s -w : $_hg_global_opts $_hg_style_opts \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
571 '(--rev -r)'{-r+,--rev}'[show only heads which are descendants of rev]:revision:_hg_labels'
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
572 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
573
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
574 _hg_cmd_help() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
575 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
576 '*:mercurial command:_hg_commands'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
577 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
578
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
579 _hg_cmd_identify() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
580 _arguments -s -w : $_hg_global_opts \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
581 '(--rev -r)'{-r+,--rev}'[identify the specified rev]:revision:_hg_labels' \
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
582 '(--num -n)'{-n+,--num}'[show local revision number]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
583 '(--id -i)'{-i+,--id}'[show global revision id]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
584 '(--branch -b)'{-b+,--branch}'[show branch]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
585 '(--tags -t)'{-t+,--tags}'[show tags]'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
586 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
587
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
588 _hg_cmd_import() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
589 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
590 '(--strip -p)'{-p+,--strip}'[directory strip option for patch (default: 1)]:count:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
591 '(--message -m)'{-m+,--message}'[use <text> as commit message]:text:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
592 '(--force -f)'{-f,--force}'[skip check for outstanding uncommitted changes]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
593 '*:patch:_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
594 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
595
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
596 _hg_cmd_incoming() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
597 _arguments -s -w : $_hg_global_opts $_hg_remote_opts $_hg_style_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
598 '(--no-merges -M)'{-M,--no-merges}'[do not show merge revisions]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
599 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
600 '(--patch -p)'{-p,--patch}'[show patch]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
601 '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]:revision:_hg_tags' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
602 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
603 '--bundle[file to store the bundles into]:bundle file:_files' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
604 ':source:_hg_remote'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
605 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
606
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
607 _hg_cmd_init() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
608 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
609 ':dir:_files -/'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
610 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
611
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
612 _hg_cmd_locate() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
613 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
614 '(--rev -r)'{-r+,--rev}'[search repository as it stood at revision]:revision:_hg_labels' \
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
615 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
616 '(--fullpath -f)'{-f,--fullpath}'[print complete paths]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
617 '*:search pattern:_hg_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
618 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
619
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
620 _hg_cmd_log() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
621 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_style_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
622 '(--follow --follow-first -f)'{-f,--follow}'[follow changeset or history]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
623 '(-f --follow)--follow-first[only follow the first parent of merge changesets]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
624 '(--copies -C)'{-C,--copies}'[show copied files]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
625 '(--keyword -k)'{-k+,--keyword}'[search for a keyword]:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
626 '(--limit -l)'{-l+,--limit}'[limit number of changes displayed]:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
627 '*'{-r,--rev}'[show the specified revision or range]:revision:_hg_revrange' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
628 '(--no-merges -M)'{-M,--no-merges}'[do not show merges]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
629 '(--only-merges -m)'{-m,--only-merges}'[show only merges]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
630 '(--patch -p)'{-p,--patch}'[show patch]' \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
631 '(--prune -P)'{-P+,--prune}'[do not display revision or any of its ancestors]:revision:_hg_labels' \
270
1e2125a577da _hg: import updated version from upstream
Augie Fackler <durin42@gmail.com>
parents: 240
diff changeset
632 '(--branch -b)'{-b+,--branch}'[show changesets within the given named branch]:branch:_hg_branches' \
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
633 '*:files:_hg_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
634 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
635
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
636 _hg_cmd_manifest() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
637 _arguments -s -w : $_hg_global_opts \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
638 ':revision:_hg_labels'
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
639 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
640
57
0ba810271408 basic completions for hg merge
Augie Fackler <durin42@gmail.com>
parents: 56
diff changeset
641 _hg_cmd_merge() {
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
642 _arguments -s -w : $_hg_global_opts \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
643 '(--force -f)'{-f,--force}'[force a merge with outstanding changes]' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
644 '(--rev -r 1)'{-r,--rev}'[revision to merge]:revision:_hg_mergerevs' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
645 '(--preview -P)'{-P,--preview}'[review revisions to merge (no merge is performed)]' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
646 ':revision:_hg_mergerevs'
57
0ba810271408 basic completions for hg merge
Augie Fackler <durin42@gmail.com>
parents: 56
diff changeset
647 }
0ba810271408 basic completions for hg merge
Augie Fackler <durin42@gmail.com>
parents: 56
diff changeset
648
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
649 _hg_cmd_outgoing() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
650 _arguments -s -w : $_hg_global_opts $_hg_remote_opts $_hg_style_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
651 '(--no-merges -M)'{-M,--no-merges}'[do not show merge revisions]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
652 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
653 '(--patch -p)'{-p,--patch}'[show patch]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
654 '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
655 '(--newest-first -n)'{-n,--newest-first}'[show newest record first]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
656 ':destination:_hg_remote'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
657 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
658
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
659 _hg_cmd_parents() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
660 _arguments -s -w : $_hg_global_opts $_hg_style_opts \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
661 '(--rev -r)'{-r+,--rev}'[show parents of the specified rev]:revision:_hg_labels' \
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
662 ':last modified file:_hg_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
663 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
664
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
665 _hg_cmd_paths() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
666 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
667 ':path:_hg_paths'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
668 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
669
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
670 _hg_cmd_pull() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
671 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
672 '(--force -f)'{-f,--force}'[run even when the remote repository is unrelated]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
673 '(--update -u)'{-u,--update}'[update to new tip if changesets were pulled]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
674 '(--rev -r)'{-r+,--rev}'[a specific revision up to which you would like to pull]:revision:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
675 ':source:_hg_remote'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
676 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
677
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
678 _hg_cmd_push() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
679 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
680 '(--force -f)'{-f,--force}'[force push]' \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
681 '(--rev -r)'{-r+,--rev}'[a specific revision you would like to push]:revision:_hg_labels' \
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
682 ':destination:_hg_remote'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
683 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
684
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
685 _hg_cmd_remove() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
686 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
687 '(--after -A)'{-A,--after}'[record remove that has already occurred]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
688 '(--force -f)'{-f,--force}'[remove file even if modified]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
689 '*:file:_hg_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
690 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
691
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
692 _hg_cmd_rename() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
693 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
694 '(--after -A)'{-A,--after}'[record a rename that has already occurred]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
695 '(--force -f)'{-f,--force}'[forcibly copy over an existing managed file]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
696 '*:file:_hg_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
697 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
698
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
699 _hg_cmd_resolve() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
700 local context state line
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
701 typeset -A opt_args
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
702
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
703 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
704 '(--list -l --mark -m --unmark -u)'{-l,--list}'[list state of files needing merge]:*:merged files:->resolve_files' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
705 '(--mark -m --list -l --unmark -u)'{-m,--mark}'[mark files as resolved]:*:unresolved files:_hg_unresolved' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
706 '(--unmark -u --list -l --mark -m)'{-u,--unmark}'[unmark files as resolved]:*:resolved files:_hg_resolved' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
707 '*:file:_hg_unresolved'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
708
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
709 if [[ $state == 'resolve_files' ]]
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
710 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
711 _alternative 'files:resolved files:_hg_resolved' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
712 'files:unresolved files:_hg_unresolved'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
713 fi
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
714 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
715
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
716 _hg_cmd_revert() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
717 local context state line
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
718 typeset -A opt_args
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
719
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
720 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_dryrun_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
721 '(--all -a :)'{-a,--all}'[revert all changes when no arguments given]' \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
722 '(--rev -r)'{-r+,--rev}'[revision to revert to]:revision:_hg_labels' \
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
723 '--no-backup[do not save backup copies of files]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
724 '*:file:->diff_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
725
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
726 if [[ $state == 'diff_files' ]]
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
727 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
728 if [[ -n $opt_args[-r] ]]
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
729 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
730 _hg_files
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
731 else
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
732 typeset -a status_files
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
733 _hg_status mard
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
734 _wanted files expl 'modified, added, removed or deleted file' _multi_parts / status_files
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
735 fi
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
736 fi
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
737 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
738
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
739 _hg_cmd_serve() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
740 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
741 '(--accesslog -A)'{-A+,--accesslog}'[name of access log file]:log file:_files' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
742 '(--errorlog -E)'{-E+,--errorlog}'[name of error log file]:log file:_files' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
743 '(--daemon -d)'{-d,--daemon}'[run server in background]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
744 '(--port -p)'{-p+,--port}'[listen port]:listen port:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
745 '(--address -a)'{-a+,--address}'[interface address]:interface address:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
746 '(--name -n)'{-n+,--name}'[name to show in web pages]:repository name:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
747 '(--templates -t)'{-t,--templates}'[web template directory]:template dir:_files -/' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
748 '--style[web template style]:style' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
749 '--stdio[for remote clients]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
750 '(--ipv6 -6)'{-6,--ipv6}'[use IPv6 in addition to IPv4]'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
751 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
752
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
753 _hg_cmd_showconfig() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
754 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
755 '(--untrusted -u)'{-u+,--untrusted}'[show untrusted configuration options]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
756 ':config item:_hg_config'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
757 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
758
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
759 _hg_cmd_status() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
760 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
761 '(--all -A)'{-A,--all}'[show status of all files]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
762 '(--modified -m)'{-m,--modified}'[show only modified files]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
763 '(--added -a)'{-a,--added}'[show only added files]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
764 '(--removed -r)'{-r,--removed}'[show only removed files]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
765 '(--deleted -d)'{-d,--deleted}'[show only deleted (but tracked) files]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
766 '(--clean -c)'{-c,--clean}'[show only files without changes]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
767 '(--unknown -u)'{-u,--unknown}'[show only unknown files]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
768 '(--ignored -i)'{-i,--ignored}'[show ignored files]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
769 '(--no-status -n)'{-n,--no-status}'[hide status prefix]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
770 '(--copies -C)'{-C,--copies}'[show source of copied files]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
771 '(--print0 -0)'{-0,--print0}'[end filenames with NUL, for use with xargs]' \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
772 '--rev[show difference from revision]:revision:_hg_labels' \
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
773 '*:files:_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
774 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
775
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
776 _hg_cmd_summary() {
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
777 _arguments -s -w : $_hg_global_opts \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
778 '--remote[check for push and pull]'
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
779 }
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
780
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
781 _hg_cmd_tag() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
782 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
783 '(--local -l)'{-l,--local}'[make the tag local]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
784 '(--message -m)'{-m+,--message}'[message for tag commit log entry]:message:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
785 '(--date -d)'{-d+,--date}'[record datecode as commit date]:date code:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
786 '(--user -u)'{-u+,--user}'[record user as commiter]:user:' \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
787 '(--rev -r)'{-r+,--rev}'[revision to tag]:revision:_hg_labels' \
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
788 ':tag name:'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
789 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
790
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
791 _hg_cmd_tip() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
792 _arguments -s -w : $_hg_global_opts $_hg_style_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
793 '(--patch -p)'{-p,--patch}'[show patch]'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
794 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
795
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
796 _hg_cmd_unbundle() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
797 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
798 '(--update -u)'{-u,--update}'[update to new tip if changesets were unbundled]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
799 ':files:_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
800 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
801
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
802 _hg_cmd_update() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
803 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
804 '(--clean -C)'{-C,--clean}'[overwrite locally modified files]' \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
805 '(--rev -r)'{-r+,--rev}'[revision]:revision:_hg_labels' \
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
806 ':revision:_hg_labels'
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
807 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
808
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
809 ## extensions ##
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
810
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
811 # HGK
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
812 _hg_cmd_view() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
813 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
814 '(--limit -l)'{-l+,--limit}'[limit number of changes displayed]:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
815 ':revision range:_hg_tags'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
816 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
817
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
818 # MQ
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
819 _hg_qseries() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
820 typeset -a patches
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
821 patches=(${(f)"$(_hg_cmd qseries)"})
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
822 (( $#patches )) && _describe -t hg-patches 'patches' patches
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
823 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
824
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
825 _hg_qapplied() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
826 typeset -a patches
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
827 patches=(${(f)"$(_hg_cmd qapplied)"})
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
828 if (( $#patches ))
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
829 then
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
830 patches+=(qbase qtip)
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
831 _describe -t hg-applied-patches 'applied patches' patches
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
832 fi
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
833 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
834
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
835 _hg_qunapplied() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
836 typeset -a patches
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
837 patches=(${(f)"$(_hg_cmd qunapplied)"})
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
838 (( $#patches )) && _describe -t hg-unapplied-patches 'unapplied patches' patches
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
839 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
840
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
841 # unapplied, including guarded patches
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
842 _hg_qdeletable() {
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
843 typeset -a unapplied
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
844 unapplied=(${(f)"$(_hg_cmd qseries)"})
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
845 for p in $(_hg_cmd qapplied)
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
846 do
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
847 unapplied=(${unapplied:#$p})
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
848 done
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
849
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
850 (( $#unapplied )) && _describe -t hg-allunapplied-patches 'all unapplied patches' unapplied
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
851 }
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
852
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
853 _hg_qguards() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
854 typeset -a guards
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
855 local guard
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
856 compset -P "+|-"
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
857 _hg_cmd qselect -s | while read guard
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
858 do
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
859 guards+=(${guard#(+|-)})
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
860 done
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
861 (( $#guards )) && _describe -t hg-guards 'guards' guards
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
862 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
863
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
864 _hg_qseries_opts=(
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
865 '(--summary -s)'{-s,--summary}'[print first line of patch header]')
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
866
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
867 _hg_cmd_qapplied() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
868 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
869 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
870
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
871 _hg_cmd_qdelete() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
872 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
873 '(--keep -k)'{-k,--keep}'[keep patch file]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
874 '*'{-r+,--rev}'[stop managing a revision]:applied patch:_hg_revrange' \
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
875 '*:unapplied patch:_hg_qdeletable'
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
876 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
877
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
878 _hg_cmd_qdiff() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
879 _arguments -s -w : $_hg_global_opts $_hg_pat_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
880 '*:pattern:_hg_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
881 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
882
281
268587bbfc2b _hg: update to latest upstream zsh completion
Augie Fackler <raf@durin42.com>
parents: 270
diff changeset
883 _hg_cmd_qfinish() {
268587bbfc2b _hg: update to latest upstream zsh completion
Augie Fackler <raf@durin42.com>
parents: 270
diff changeset
884 _arguments -s -w : $_hg_global_opts \
268587bbfc2b _hg: update to latest upstream zsh completion
Augie Fackler <raf@durin42.com>
parents: 270
diff changeset
885 '(--applied -a)'{-a,--applied}'[finish all applied patches]' \
268587bbfc2b _hg: update to latest upstream zsh completion
Augie Fackler <raf@durin42.com>
parents: 270
diff changeset
886 '*:patch:_hg_qapplied'
268587bbfc2b _hg: update to latest upstream zsh completion
Augie Fackler <raf@durin42.com>
parents: 270
diff changeset
887 }
268587bbfc2b _hg: update to latest upstream zsh completion
Augie Fackler <raf@durin42.com>
parents: 270
diff changeset
888
292
69ad773a1484 _hg: import from upstream
Augie Fackler <durin42@gmail.com>
parents: 281
diff changeset
889 _hg_cmd_qfinish() {
69ad773a1484 _hg: import from upstream
Augie Fackler <durin42@gmail.com>
parents: 281
diff changeset
890 _arguments -s -w : $_hg_global_opts \
69ad773a1484 _hg: import from upstream
Augie Fackler <durin42@gmail.com>
parents: 281
diff changeset
891 '(--all -a)'{-a,--all}'[finish all patches]' \
69ad773a1484 _hg: import from upstream
Augie Fackler <durin42@gmail.com>
parents: 281
diff changeset
892 '*:patch:_hg_qapplied'
69ad773a1484 _hg: import from upstream
Augie Fackler <durin42@gmail.com>
parents: 281
diff changeset
893 }
69ad773a1484 _hg: import from upstream
Augie Fackler <durin42@gmail.com>
parents: 281
diff changeset
894
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
895 _hg_cmd_qfold() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
896 _arguments -s -w : $_hg_global_opts $_h_commit_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
897 '(--keep,-k)'{-k,--keep}'[keep folded patch files]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
898 '*:unapplied patch:_hg_qunapplied'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
899 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
900
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
901 _hg_cmd_qgoto() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
902 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
903 '(--force -f)'{-f,--force}'[overwrite any local changes]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
904 ':patch:_hg_qseries'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
905 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
906
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
907 _hg_cmd_qguard() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
908 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
909 '(--list -l)'{-l,--list}'[list all patches and guards]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
910 '(--none -n)'{-n,--none}'[drop all guards]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
911 ':patch:_hg_qseries' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
912 '*:guards:_hg_qguards'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
913 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
914
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
915 _hg_cmd_qheader() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
916 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
917 ':patch:_hg_qseries'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
918 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
919
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
920 _hg_cmd_qimport() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
921 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
922 '(--existing -e)'{-e,--existing}'[import file in patch dir]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
923 '(--name -n 2)'{-n+,--name}'[patch file name]:name:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
924 '(--force -f)'{-f,--force}'[overwrite existing files]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
925 '*'{-r+,--rev}'[place existing revisions under mq control]:revision:_hg_revrange' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
926 '*:patch:_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
927 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
928
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
929 _hg_cmd_qnew() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
930 _arguments -s -w : $_hg_global_opts $_hg_commit_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
931 '(--force -f)'{-f,--force}'[import uncommitted changes into patch]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
932 ':patch:'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
933 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
934
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
935 _hg_cmd_qnext() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
936 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
937 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
938
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
939 _hg_cmd_qpop() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
940 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
941 '(--all -a :)'{-a,--all}'[pop all patches]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
942 '(--name -n)'{-n+,--name}'[queue name to pop]:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
943 '(--force -f)'{-f,--force}'[forget any local changes]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
944 ':patch:_hg_qapplied'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
945 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
946
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
947 _hg_cmd_qprev() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
948 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
949 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
950
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
951 _hg_cmd_qpush() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
952 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
953 '(--all -a :)'{-a,--all}'[apply all patches]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
954 '(--list -l)'{-l,--list}'[list patch name in commit text]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
955 '(--merge -m)'{-m+,--merge}'[merge from another queue]:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
956 '(--name -n)'{-n+,--name}'[merge queue name]:' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
957 '(--force -f)'{-f,--force}'[apply if the patch has rejects]' \
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
958 '--move[reorder patch series and apply only the patch]' \
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
959 ':patch:_hg_qunapplied'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
960 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
961
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
962 _hg_cmd_qrefresh() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
963 _arguments -s -w : $_hg_global_opts $_hg_pat_opts $_hg_commit_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
964 '(--git -g)'{-g,--git}'[use git extended diff format]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
965 '(--short -s)'{-s,--short}'[short refresh]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
966 '*:files:_hg_files'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
967 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
968
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
969 _hg_cmd_qrename() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
970 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
971 ':patch:_hg_qseries' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
972 ':destination:'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
973 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
974
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
975 _hg_cmd_qselect() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
976 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
977 '(--none -n :)'{-n,--none}'[disable all guards]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
978 '(--series -s :)'{-s,--series}'[list all guards in series file]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
979 '--pop[pop to before first guarded applied patch]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
980 '--reapply[pop and reapply patches]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
981 '*:guards:_hg_qguards'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
982 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
983
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
984 _hg_cmd_qseries() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
985 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
986 '(--missing -m)'{-m,--missing}'[print patches not in series]'
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
987 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
988
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
989 _hg_cmd_qunapplied() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
990 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
991 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
992
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
993 _hg_cmd_qtop() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
994 _arguments -s -w : $_hg_global_opts $_hg_qseries_opts
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
995 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
996
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
997 _hg_cmd_strip() {
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
998 _arguments -s -w : $_hg_global_opts \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
999 '(--force -f)'{-f,--force}'[force multi-head removal]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
1000 '(--backup -b)'{-b,--backup}'[bundle unrelated changesets]' \
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
1001 '(--nobackup -n)'{-n,--nobackup}'[no backups]' \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
1002 ':revision:_hg_labels'
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
1003 }
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
1004
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1005 # Patchbomb
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1006 _hg_cmd_email() {
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1007 _arguments -s -w : $_hg_global_opts $_hg_remote_opts \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1008 '(--git -g)'{-g,--git}'[use git extended diff format]' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1009 '--plain[omit hg patch header]' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1010 '(--outgoing -o)'{-o,--outgoing}'[send changes not found in the target repository]' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1011 '(--bundle -b)'{-b,--bundle}'[send changes not in target as a binary bundle]' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1012 '--bundlename[name of the bundle attachment file (default: bundle)]:' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1013 '*'{-r+,--rev}'[search in given revision range]:revision:_hg_revrange' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1014 '--force[run even when remote repository is unrelated (with -b/--bundle)]' \
240
c451e42b3ecc zsh _hg: correctly complete bookmarks from hg 1.8 and later
Augie Fackler <durin42@gmail.com>
parents: 229
diff changeset
1015 '*--base[a base changeset to specify instead of a destination (with -b/--bundle)]:revision:_hg_labels' \
229
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1016 '--intro[send an introduction email for a single patch]' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1017 '(--inline -i --attach -a)'{-a,--attach}'[send patches as attachments]' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1018 '(--attach -a --inline -i)'{-i,--inline}'[send patches as inline attachments]' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1019 '*--bcc[email addresses of blind carbon copy recipients]:email:' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1020 '*'{-c+,--cc}'[email addresses of copy recipients]:email:' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1021 '(--diffstat -d)'{-d,--diffstat}'[add diffstat output to messages]' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1022 '--date[use the given date as the sending date]:date:' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1023 '--desc[use the given file as the series description]:files:_files' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1024 '(--from -f)'{-f,--from}'[email address of sender]:email:' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1025 '(--test -n)'{-n,--test}'[print messages that would be sent]' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1026 '(--mbox -m)'{-m,--mbox}'[write messages to mbox file instead of sending them]:file:' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1027 '*--reply-to[email addresses replies should be sent to]:email:' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1028 '(--subject -s)'{-s,--subject}'[subject of first message (intro or single patch)]:subject:' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1029 '--in-reply-to[message identifier to reply to]:msgid:' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1030 '*--flag[flags to add in subject prefixes]:flag:' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1031 '*'{-t,--to}'[email addresses of recipients]:email:' \
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1032 ':revision:_hg_revrange'
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1033 }
e5a40e768cf8 zfun: import newer _hg for improved hg completions
Augie Fackler <durin42@gmail.com>
parents: 57
diff changeset
1034
55
846d556d9619 Add a custom _hg (modified off of recent crew) and fix up function path stuff in hg to improve my hg tab completions.
Augie Fackler <durin42@gmail.com>
parents:
diff changeset
1035 _hg "$@"