Show More
@@ -154,18 +154,34 b' typeset -A _hg_cmd_globals' | |||||
154 | 'files:missing files:_hg_missing' |
|
154 | 'files:missing files:_hg_missing' | |
155 | } |
|
155 | } | |
156 |
|
156 | |||
|
157 | _hg_urls() { | |||
|
158 | if compset -P bundle:// | |||
|
159 | then | |||
|
160 | _files | |||
|
161 | elif [[ -prefix *: ]] | |||
|
162 | then | |||
|
163 | _urls | |||
|
164 | else | |||
|
165 | local expl | |||
|
166 | compset -S '[^:]*' | |||
|
167 | _wanted url-schemas expl 'URL schema' compadd -S '' - \ | |||
|
168 | http:// https:// ssh:// bundle:// | |||
|
169 | fi | |||
|
170 | } | |||
|
171 | ||||
157 | _hg_paths() { |
|
172 | _hg_paths() { | |
158 | typeset -a paths pnames |
|
173 | typeset -a paths pnames | |
159 | _hg_cmd paths 2> /dev/null | while read -A pnames |
|
174 | _hg_cmd paths 2> /dev/null | while read -A pnames | |
160 | do |
|
175 | do | |
161 | paths+=($pnames[1]) |
|
176 | paths+=($pnames[1]) | |
162 | done |
|
177 | done | |
163 |
(( $#paths )) && _describe -t |
|
178 | (( $#paths )) && _describe -t path-aliases 'repository alias' paths | |
164 | } |
|
179 | } | |
165 |
|
180 | |||
166 | _hg_remote() { |
|
181 | _hg_remote() { | |
167 |
_alternative ' |
|
182 | _alternative 'path-aliases:repository alias:_hg_paths' \ | |
168 | 'directories:directory:_files -/' |
|
183 | 'directories:directory:_files -/' \ | |
|
184 | 'urls:URL schema:_hg_urls' | |||
169 | } |
|
185 | } | |
170 |
|
186 | |||
171 | # Common options |
|
187 | # Common options |
General Comments 0
You need to be logged in to leave comments.
Login now