Mercurial > hg
comparison contrib/zsh_completion @ 6804:694223a29ad4
Added missing --config global option to zsh_completion.
The global options --encoding and --encodingmode where also added.
Without these options some functionality breaks. Also added basic
completion for config items for the --config option.
author | byron@base2.cc |
---|---|
date | Thu, 03 Jul 2008 20:53:14 -0700 |
parents | 838fa52abcc1 |
children | 62b75d73c33d |
comparison
equal
deleted
inserted
replaced
6803:4a8b9cf62a6b | 6804:694223a29ad4 |
---|---|
203 _wanted files expl 'modified files' _multi_parts / status_files | 203 _wanted files expl 'modified files' _multi_parts / status_files |
204 } | 204 } |
205 | 205 |
206 _hg_config() { | 206 _hg_config() { |
207 typeset -a items | 207 typeset -a items |
208 local line | 208 items=(${${(%f)"$(_call_program hg hg showconfig)"}%%\=*}) |
209 items=(${${(%f)"$(_hg_cmd showconfig)"}%%\=*}) | |
210 (( $#items )) && _describe -t config 'config item' items | 209 (( $#items )) && _describe -t config 'config item' items |
211 } | 210 } |
212 | 211 |
213 _hg_addremove() { | 212 _hg_addremove() { |
214 _alternative 'files:unknown files:_hg_unknown' \ | 213 _alternative 'files:unknown files:_hg_unknown' \ |
289 _hg_global_opts=( | 288 _hg_global_opts=( |
290 '(--repository -R)'{-R+,--repository}'[repository root directory]:repository:_files -/' | 289 '(--repository -R)'{-R+,--repository}'[repository root directory]:repository:_files -/' |
291 '--cwd[change working directory]:new working directory:_files -/' | 290 '--cwd[change working directory]:new working directory:_files -/' |
292 '(--noninteractive -y)'{-y,--noninteractive}'[do not prompt, assume yes for any required answers]' | 291 '(--noninteractive -y)'{-y,--noninteractive}'[do not prompt, assume yes for any required answers]' |
293 '(--verbose -v)'{-v,--verbose}'[enable additional output]' | 292 '(--verbose -v)'{-v,--verbose}'[enable additional output]' |
293 '*--config[set/override config option]:defined config items:_hg_config' | |
294 '(--quiet -q)'{-q,--quiet}'[suppress output]' | 294 '(--quiet -q)'{-q,--quiet}'[suppress output]' |
295 '(--help -h)'{-h,--help}'[display help and exit]' | 295 '(--help -h)'{-h,--help}'[display help and exit]' |
296 '--debug[debug mode]' | 296 '--debug[debug mode]' |
297 '--debugger[start debugger]' | 297 '--debugger[start debugger]' |
298 '--encoding[set the charset encoding (default: UTF8)]' | |
299 '--encodingmode[set the charset encoding mode (default: strict)]' | |
300 '--lsprof[print improved command execution profile]' | |
298 '--traceback[print traceback on exception]' | 301 '--traceback[print traceback on exception]' |
299 '--time[time how long the command takes]' | 302 '--time[time how long the command takes]' |
300 '--profile[profile]' | 303 '--profile[profile]' |
301 '--version[output version information and exit]' | 304 '--version[output version information and exit]' |
302 ) | 305 ) |