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.
--- 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