bash_completion: expand aliased commands
authorSean Farley <sean.michael.farley@gmail.com>
Wed, 20 Nov 2013 15:16:54 -0500
changeset 20124 dd3af304b3c8
parent 20123 f16240c8e959
child 20125 191ab08e7099
bash_completion: expand aliased commands
contrib/bash_completion
--- a/contrib/bash_completion	Tue Nov 19 11:45:30 2013 -0500
+++ b/contrib/bash_completion	Wed Nov 20 15:16:54 2013 -0500
@@ -219,6 +219,9 @@
         fi
     fi
 
+    local aliascmd=$(_hg_cmd showconfig alias.$cmd | awk '{print $1}')
+    [ -n "$aliascmd" ] && cmd=$aliascmd
+
     case "$cmd" in
         help)
             _hg_commands