Mercurial > hg > mercurial-crew-with-dirclash
comparison contrib/bash_completion @ 2695:c995d68333cf
Improve bash_completion for patches in MQ
author | "Mathieu Clabaut <mathieu.clabaut@gmail.com>" |
---|---|
date | Wed, 26 Jul 2006 20:15:31 +0200 |
parents | 077a2da7f1de |
children | 03932425cfd8 |
comparison
equal
deleted
inserted
replaced
2694:0fb28dbf0dc7 | 2695:c995d68333cf |
---|---|
286 _hg_ext_mq_patchlist qunapplied | 286 _hg_ext_mq_patchlist qunapplied |
287 } | 287 } |
288 | 288 |
289 _hg_cmd_qdelete() | 289 _hg_cmd_qdelete() |
290 { | 290 { |
291 _hg_ext_mq_patchlist qseries | 291 _hg_ext_mq_patchlist qunapplied |
292 } | 292 } |
293 | 293 |
294 _hg_cmd_qsave() | 294 _hg_cmd_qsave() |
295 { | 295 { |
296 if [[ "$prev" = @(-n|--name) ]]; then | 296 if [[ "$prev" = @(-n|--name) ]]; then |
309 local root=$("$hg" root 2>/dev/null) | 309 local root=$("$hg" root 2>/dev/null) |
310 # this is run in a sub-shell, so we can't use _hg_status | 310 # this is run in a sub-shell, so we can't use _hg_status |
311 local files=$(cd "$root/.hg/patches" 2>/dev/null && | 311 local files=$(cd "$root/.hg/patches" 2>/dev/null && |
312 "$hg" status -nmar 2>/dev/null) | 312 "$hg" status -nmar 2>/dev/null) |
313 COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$files' -- "$cur")) | 313 COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$files' -- "$cur")) |
314 } | |
315 | |
316 _hg_cmd_export() | |
317 { | |
318 _hg_ext_mq_patchlist qapplied | |
314 } | 319 } |
315 | 320 |
316 | 321 |
317 # hbisect | 322 # hbisect |
318 _hg_cmd_bisect() | 323 _hg_cmd_bisect() |