[PATCH 2 of 2] bash_completion: complete arguments for --color and --pager
Anton Shestakov
av6 at dwimlabs.net
Sat Sep 1 20:54:48 EDT 2018
# HG changeset patch
# User Anton Shestakov <av6 at dwimlabs.net>
# Date 1535848857 -28800
# Sun Sep 02 08:40:57 2018 +0800
# Node ID 2a342d7f75f02808bebbb811ed3998b65e7b2aad
# Parent 14eaf06a028a010ca829084acfb866823ad5714a
bash_completion: complete arguments for --color and --pager
diff --git a/contrib/bash_completion b/contrib/bash_completion
--- a/contrib/bash_completion
+++ b/contrib/bash_completion
@@ -206,6 +206,18 @@ shopt -s extglob
_hg_fix_wordlist
return
;;
+ --color)
+ local choices='true false yes no always auto never debug'
+ COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$choices' -- "$cur"))
+ _hg_fix_wordlist
+ return
+ ;;
+ --pager)
+ local choices='true false yes no always auto never'
+ COMPREPLY=(${COMPREPLY[@]:-} $(compgen -W '$choices' -- "$cur"))
+ _hg_fix_wordlist
+ return
+ ;;
esac
if [ -z "$cmd" ] || [ $COMP_CWORD -eq $i ]; then
More information about the Mercurial-devel
mailing list