Patchwork bash_completion: recognize normal command abbreviations

login
register
mail settings
Submitter Bryan O'Sullivan
Date March 22, 2013, 12:05 a.m.
Message ID <df62a10c59a4e333909a.1363910714@1.0.0.127.in-addr.arpa>
Download mbox | patch
Permalink /patch/1153/
State Accepted
Commit 63dc020e8cb78f604704635cde0ede1ab7f07cac
Headers show

Comments

Bryan O'Sullivan - March 22, 2013, 12:05 a.m.
# HG changeset patch
# User Bryan O'Sullivan <bryano@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.

Patch

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)