1. Jakub Zalewski
  2. oh-my-zsh-mirror

Commits

Robby Russell  committed dfc7319 Merge

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

Fix completion for bundled commands using the bundler plugin

  • Participants
  • Parent commits cceb387, 965e1cf
  • Branches master

Comments (0)

Files changed (1)

File plugins/bundler/bundler.plugin.zsh

View file
  • Ignore whitespace
 
 ## Main program
 for cmd in $bundled_commands; do
-  alias $cmd="_run-with-bundler $cmd"
+  eval "function bundled_$cmd () { _run-with-bundler $cmd \$@}"
+  alias $cmd=bundled_$cmd
+
+  if which _$cmd > /dev/null 2>&1; then
+        compdef _$cmd bundled_$cmd
+  fi
 done