[PATCH] bash_completion: recognize normal command abbreviations

Bryan O'Sullivan bos at serpentine.com
Thu Mar 21 19:05:14 CDT 2013


# HG changeset patch
# User Bryan O'Sullivan <bryano at fb.com>
# Date 1363910699 25200
#      Thu Mar 21 17:04:59 2013 -0700
# Node ID df62a10c59a4e333909a8cf5dea5eadafdd6cf3e
# Parent  a821ec835223492b9605e4804abfaaec8700cbb3
bash_completion: recognize normal command abbreviations

This eliminates a call to "hg help" to get a complete command name.

diff --git a/contrib/bash_completion b/contrib/bash_completion
--- a/contrib/bash_completion
+++ b/contrib/bash_completion
@@ -229,7 +229,7 @@ shopt -s extglob
 	    fi
 	    _hg_labels
 	;;
-	manifest|update)
+	manifest|update|up|checkout|co)
 	    _hg_labels
 	;;
 	pull|push|outgoing|incoming)
@@ -245,10 +245,10 @@ shopt -s extglob
 	merge)
 	    _hg_labels
 	;;
-	commit|record)
+	commit|ci|record)
 	    _hg_status "mar"
 	;;
-	remove)
+	remove|rm)
 	    _hg_debugpathcomplete -n
 	;;
 	forget)


More information about the Mercurial-devel mailing list