Patchwork [3,of,8,V2] bash_completion: expand aliased commands

login
register
mail settings
Submitter Sean Farley
Date Nov. 22, 2013, 8:26 p.m.
Message ID <d74d30e3165e68bbd0c2.1385151963@laptop.local>
Download mbox | patch
Permalink /patch/3094/
State Superseded
Commit dd3af304b3c8684ee8327515d9e990d16c060d19
Headers show

Comments

Sean Farley - Nov. 22, 2013, 8:26 p.m.
# HG changeset patch
# User Sean Farley <sean.michael.farley@gmail.com>
# Date 1384978614 18000
#      Wed Nov 20 15:16:54 2013 -0500
# Node ID d74d30e3165e68bbd0c27290c8e8211e2dadd4ed
# Parent  4870c6bcf56d3b86fd7456b7075cfd0ba86212b9
bash_completion: expand aliased commands

Patch

diff --git a/contrib/bash_completion b/contrib/bash_completion
--- a/contrib/bash_completion
+++ b/contrib/bash_completion
@@ -217,10 +217,13 @@ 
         else
             return 1
         fi
     fi
 
+    local aliascmd=$(_hg_cmd showconfig alias.$cmd | awk '{print $1}')
+    [ -n "$aliascmd" ] && cmd=$aliascmd
+
     case "$cmd" in
         help)
             _hg_commands
         ;;
         export)