Browse code

Merge pull request #594 from sirech/fix-bundle-compl

Fix completion for bundled commands using the bundler plugin

Robby Russell authored on 10/10/2011 at 12:44:26
Showing 1 changed files
... ...
@@ -37,5 +37,10 @@ _run-with-bundler() {
37 37
 
38 38
 ## Main program
39 39
 for cmd in $bundled_commands; do
40
-  alias $cmd="_run-with-bundler $cmd"
40
+  eval "function bundled_$cmd () { _run-with-bundler $cmd \$@}"
41
+  alias $cmd=bundled_$cmd
42
+
43
+  if which _$cmd > /dev/null 2>&1; then
44
+        compdef _$cmd bundled_$cmd
45
+  fi
41 46
 done