contrib/bash_completion
changeset 3479 a8823e6824fc
parent 3478 34cc82c6c7c2
child 3480 26285469db9b
equal deleted inserted replaced
3478:34cc82c6c7c2 3479:a8823e6824fc
   326     local files=$(cd "$root/.hg/patches" 2>/dev/null &&
   326     local files=$(cd "$root/.hg/patches" 2>/dev/null &&
   327                   "$hg" status -nmar 2>/dev/null)
   327                   "$hg" status -nmar 2>/dev/null)
   328     COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$files' -- "$cur"))
   328     COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$files' -- "$cur"))
   329 }
   329 }
   330 
   330 
       
   331 _hg_cmd_qfold()
       
   332 {
       
   333     _hg_ext_mq_patchlist qunapplied
       
   334 }
       
   335 
       
   336 _hg_cmd_qrename()
       
   337 {
       
   338     _hg_ext_mq_patchlist qseries
       
   339 }
       
   340 
       
   341 _hg_cmd_qheader()
       
   342 {
       
   343     _hg_ext_mq_patchlist qseries
       
   344 }
       
   345 
       
   346 _hg_cmd_qclone()
       
   347 {
       
   348     local count=$(_hg_count_non_option)
       
   349     if [ $count = 1 ]; then
       
   350 	_hg_paths
       
   351     fi
       
   352     _hg_repos
       
   353 }
       
   354 
       
   355 _hg_ext_mq_guards()
       
   356 {
       
   357     "$hg" qselect --series 2>/dev/null | sed -e 's/^.//'
       
   358 }
       
   359 
       
   360 _hg_cmd_qselect()
       
   361 {
       
   362     local guards=$(_hg_ext_mq_guards)
       
   363     COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$guards' -- "$cur"))
       
   364 }
       
   365 
   331 
   366 
   332 # hbisect
   367 # hbisect
   333 _hg_cmd_bisect()
   368 _hg_cmd_bisect()
   334 {
   369 {
   335     local i subcmd
   370     local i subcmd