diff contrib/bash_completion @ 20124:dd3af304b3c8

bash_completion: expand aliased commands
author Sean Farley <sean.michael.farley@gmail.com>
date Wed, 20 Nov 2013 15:16:54 -0500
parents f16240c8e959
children 191ab08e7099
line wrap: on
line diff
--- 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