Show More
@@ -5,7 +5,7 b'' | |||||
5 | # instance) |
|
5 | # instance) | |
6 | # |
|
6 | # | |
7 | # Copyright (C) 2005 Steve Borho |
|
7 | # Copyright (C) 2005 Steve Borho | |
8 | # Copyright (C) 2006 Brendan Cully |
|
8 | # Copyright (C) 2006 Brendan Cully <brendan@kublai.com> | |
9 | # |
|
9 | # | |
10 | # This is free software; you can redistribute it and/or modify it under |
|
10 | # This is free software; you can redistribute it and/or modify it under | |
11 | # the terms of the GNU General Public License as published by the Free |
|
11 | # the terms of the GNU General Public License as published by the Free | |
@@ -14,7 +14,6 b'' | |||||
14 | # |
|
14 | # | |
15 |
|
15 | |||
16 | local curcontext="$curcontext" state line |
|
16 | local curcontext="$curcontext" state line | |
17 | local repos newFiles addedFiles commitMessage |
|
|||
18 | typeset -A _hg_cmd_globals |
|
17 | typeset -A _hg_cmd_globals | |
19 |
|
18 | |||
20 | _hg() { |
|
19 | _hg() { | |
@@ -115,7 +114,7 b' typeset -A _hg_cmd_globals' | |||||
115 |
|
114 | |||
116 | _hg_commands() { |
|
115 | _hg_commands() { | |
117 | (( $#_hg_cmd_list )) || _hg_get_commands |
|
116 | (( $#_hg_cmd_list )) || _hg_get_commands | |
118 |
_describe -t |
|
117 | _describe -t commands 'mercurial command' _hg_cmd_list | |
119 | } |
|
118 | } | |
120 |
|
119 | |||
121 | _hg_tags() { |
|
120 | _hg_tags() { | |
@@ -126,7 +125,7 b' typeset -A _hg_cmd_globals' | |||||
126 | do |
|
125 | do | |
127 | tags+=($tag) |
|
126 | tags+=($tag) | |
128 | done |
|
127 | done | |
129 |
(( $#tags )) && _describe -t |
|
128 | (( $#tags )) && _describe -t tags 'tags' tags | |
130 | } |
|
129 | } | |
131 |
|
130 | |||
132 | _hg_status() { |
|
131 | _hg_status() { | |
@@ -136,18 +135,18 b' typeset -A _hg_cmd_globals' | |||||
136 | _hg_unknown() { |
|
135 | _hg_unknown() { | |
137 | typeset -a status_files |
|
136 | typeset -a status_files | |
138 | _hg_status u |
|
137 | _hg_status u | |
139 |
(( $#status_files )) && _describe -t |
|
138 | (( $#status_files )) && _describe -t files 'unknown files' status_files | |
140 | } |
|
139 | } | |
141 |
|
140 | |||
142 | _hg_missing() { |
|
141 | _hg_missing() { | |
143 | typeset -a status_files |
|
142 | typeset -a status_files | |
144 | _hg_status d |
|
143 | _hg_status d | |
145 |
(( $#status_files )) && _describe -t |
|
144 | (( $#status_files )) && _describe -t files 'missing files' status_files | |
146 | } |
|
145 | } | |
147 |
|
146 | |||
148 | _hg_addremove() { |
|
147 | _hg_addremove() { | |
149 |
_alternative |
|
148 | _alternative 'files:unknown files:_hg_unknown' \ | |
150 |
|
|
149 | 'files:missing files:_hg_missing' | |
151 | } |
|
150 | } | |
152 |
|
151 | |||
153 | _hg_paths() { |
|
152 | _hg_paths() { | |
@@ -156,12 +155,12 b' typeset -A _hg_cmd_globals' | |||||
156 | do |
|
155 | do | |
157 | paths+=($pnames[1]) |
|
156 | paths+=($pnames[1]) | |
158 | done |
|
157 | done | |
159 |
(( $#paths )) && _describe -t |
|
158 | (( $#paths )) && _describe -t urls 'repository aliases' paths | |
160 | } |
|
159 | } | |
161 |
|
160 | |||
162 | _hg_remote() { |
|
161 | _hg_remote() { | |
163 |
_alternative ' |
|
162 | _alternative 'urls:repository alias:_hg_paths' \ | |
164 |
'director |
|
163 | 'directories:directory:_files -/' | |
165 | } |
|
164 | } | |
166 |
|
165 | |||
167 | # Common options |
|
166 | # Common options |
General Comments 0
You need to be logged in to leave comments.
Login now