Mercurial > hg
changeset 29386:63fad6235369
bashcompletion: show available command-line switches for aliases
When auto-completing hg commands, aliases are listed, but not the available
switches for an alias, because `HGPLAIN=1` filters these out. Add a
`HGPLAINEXCEPT=alias` exception to resolve this.
We make heavy use of aliases that drive hg log with custom revsets, sorting and
the -G switch, but want our users to be able to auto-complete any additional
command-line switches.
author | Martijn Pieters <mjpieters@fb.com> |
---|---|
date | Tue, 21 Jun 2016 17:15:51 +0100 |
parents | aa1d56003872 |
children | 6b77adc2c7b5 |
files | contrib/bash_completion |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/contrib/bash_completion Mon Jun 20 23:31:45 2016 +0530 +++ b/contrib/bash_completion Tue Jun 21 17:15:51 2016 +0100 @@ -184,7 +184,7 @@ return fi - opts=$(_hg_cmd debugcomplete --options "$cmd") + opts=$(HGPLAINEXCEPT=alias _hg_cmd debugcomplete --options "$cmd") COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$opts' -- "$cur")) _hg_fix_wordlist