# HG changeset patch # User Alexis S. L. Carvalho # Date 1138283546 -3600 # Node ID 1c75487badd66843135f5e34804f2d8bcadaca50 # Parent 3b1b44b917f47fc44ac1e45995d9fa02a4db5e79 bash_completion: small updates and fixes - $result in _hg_commands is not an array - use "hg status ." - update "hg cat" completion - let bash itself generate the default completion diff --git a/contrib/bash_completion b/contrib/bash_completion --- a/contrib/bash_completion +++ b/contrib/bash_completion @@ -9,7 +9,7 @@ shopt -s extglob -e '/^ [^ ]/!d; s/^ //; s/[,:]//g;')) commands="${all[*]##debug*}" - result=$(compgen -W "${commands[*]}" -- "$cur") + result=$(compgen -W "$commands" -- "$cur") # hide debug commands from users, but complete them if # there is no other possible command @@ -39,7 +39,7 @@ shopt -s extglob _hg_status() { - local files="$( hg status -$1 | cut -b 3- )" + local files="$( hg status -$1 . | cut -b 3- )" COMPREPLY=(${COMPREPLY[@]:-} $( compgen -W "$files" -- "$cur" )) } @@ -167,17 +167,6 @@ shopt -s extglob debugdata) COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -X "!*.d" -- "$cur" )) ;; - cat) - local count=$(_hg_count_non_option '-o|--output') - if [ $count = 2 ]; then - _hg_tags - else - COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -- "$cur" )) - fi - ;; - *) - COMPREPLY=(${COMPREPLY[@]:-} $( compgen -f -- "$cur" )) - ;; esac }