Show More
@@ -163,10 +163,33 b' typeset -A _hg_cmd_globals' | |||||
163 | 'files:missing files:_hg_missing' |
|
163 | 'files:missing files:_hg_missing' | |
164 | } |
|
164 | } | |
165 |
|
165 | |||
|
166 | _hg_ssh_urls() { | |||
|
167 | if [[ -prefix */ ]] | |||
|
168 | then | |||
|
169 | if zstyle -T ":completion:${curcontext}:files" remote-access | |||
|
170 | then | |||
|
171 | local host=${PREFIX%%/*} | |||
|
172 | typeset -a remdirs | |||
|
173 | compset -p $(( $#host + 1 )) | |||
|
174 | local rempath=${(M)PREFIX##*/} | |||
|
175 | compset -P '*/' | |||
|
176 | remdirs=(${${(M)${(f)"$(_call_program files ssh -a -x $host ls -1FL "${(q)rempath}" 2> /dev/null)"}##*/}%/}) | |||
|
177 | _describe -t directories 'remote directory' remdirs -S/ | |||
|
178 | else | |||
|
179 | _message 'remote directory' | |||
|
180 | fi | |||
|
181 | else | |||
|
182 | _hosts -S/ | |||
|
183 | fi | |||
|
184 | } | |||
|
185 | ||||
166 | _hg_urls() { |
|
186 | _hg_urls() { | |
167 | if compset -P bundle:// |
|
187 | if compset -P bundle:// | |
168 | then |
|
188 | then | |
169 | _files |
|
189 | _files | |
|
190 | elif compset -P ssh:// | |||
|
191 | then | |||
|
192 | _hg_ssh_urls | |||
170 | elif [[ -prefix *: ]] |
|
193 | elif [[ -prefix *: ]] | |
171 | then |
|
194 | then | |
172 | _urls |
|
195 | _urls | |
@@ -190,7 +213,7 b' typeset -A _hg_cmd_globals' | |||||
190 | _hg_remote() { |
|
213 | _hg_remote() { | |
191 | _alternative 'path-aliases:repository alias:_hg_paths' \ |
|
214 | _alternative 'path-aliases:repository alias:_hg_paths' \ | |
192 | 'directories:directory:_files -/' \ |
|
215 | 'directories:directory:_files -/' \ | |
193 |
'urls:URL |
|
216 | 'urls:URL:_hg_urls' | |
194 | } |
|
217 | } | |
195 |
|
218 | |||
196 | # Common options |
|
219 | # Common options |
General Comments 0
You need to be logged in to leave comments.
Login now