bower completion error with many commands (list, info, help, etc.) #2694

Open
simonweil opened this Issue Apr 6, 2014 · 7 comments

Projects

None yet

4 participants

@simonweil

Here is an example output for the for the list command.

➜  ~  bower list <TAB>_bower:67: command not found: --no-color[Do not print colors (available in all commands)]
_bower:67: command not found: --no-color[Do not print colors (available in all commands)]
_bower:67: command not found: --no-color[Do not print colors (available in all commands)]
@simonweil simonweil changed the title from bower completion error with many commands (list, infp to bower completion error with many commands (list, info, help, etc.) Apr 6, 2014
@simonweil

@robbyrussell , I'm willing to help out with oh my zsh,
Tell me how I should start.

@ncanceill
Contributor

TL;DR Yes, it is a bug, @dongweiming please fix it.


I just confirmed this bug is on master, and I tracked it down.

It is triggered here and was introduced in 012afe2 when @dongweiming re-wrote bower completion. I believe it is a mistake, and the fix is simple:

--- a/plugins/bower/bower.plugin.zsh
+++ b/plugins/bower/bower.plugin.zsh
@@ -72,7 +72,8 @@ _bower ()
         compadd "$@" $(echo $bower_package_list)
         ;;
         *)
-        $_no_color \
+        _arguments \
+        $_no_color
         ;;
     esac

However, I do not use bower, so I cannot be sure that my fix provides the expected behavior — at least, it fixes the error, and now bower list <TAB> nicely completes to bower list --no-color.


@simonweil What you could have done:

  • Disable the bower plugin to confirm that it is the cause of the error.
  • Read the 81 lines of the plugin and figure out the problem — knowing about Zsh completion system may help here.
  • Use the git Blame tool to figure out who made the mistake.
@simonweil

@ncanceill OK, you are correct - I could have done better here.

I'm referring to the need for volunteers - I'm willing to help out with the maintenance of this great project, cut down open issues and when you trust me deal with pull requests.

I can even start by verifying and sorting open issues - just tell me what needs to be done.

@ncanceill
Contributor

@dongweiming (faulty commit), @miklos-martin (plugin maintainer)

Can you please reply to confirm that you are aware of this issue?


@simonweil

Sorry, did not mean to come up that harsh. Always glad to see people willing to help. Concerning project maintenance, it is discussed in #2568 (closed for its own purpose) and I suggest we continue this discussion there, in order to keep this thread about the bower issue.

@vko-online

bl jq [+TAB] still throws

bl jq_bower:67: command not found: --no-color[Do not print colors (available in all commands)]
_bower:67: command not found: --no-color[Do not print colors (available in all commands)]
_bower:67: command not found: --no-color[Do not print colors (available in all commands)]
@ncanceill
Contributor

One year without a reply! @dongweiming @miklos-martin please respond!

Would anyone else be willing to submit a patch?

@miklos-martin
Contributor

I suggest you to keep only one of the two plugins. They can conflict in many ways, I guess.
@ncanceill I don't use bower anymore, so I can't test it for you ATM, but I also think you provided the fix for @dongweiming's version. If I were you, I would just open a PR with that, and kindly ask someone to test it.

@jordantwombly jordantwombly pushed a commit to jordantwombly/oh-my-zsh that referenced this issue May 1, 2016
@jtwombly jtwombly fixed bower completion error from issue #2694 0788731
@evanchiu evanchiu added a commit to evanchiu/oh-my-zsh that referenced this issue May 24, 2016
@evanchiu evanchiu Merge remote-tracking branch 'robbyrussell/master'
* robbyrussell/master: (37 commits)
  added assembly alias (#5107)
  Fix styling in cakephp3 completion
  Better cake3 completion
  Change vim command to $EDITOR for consistency (#5063)
  fixed bower completion error from issue #2694 (#5056)
  vagrant snapshot (#5032)
  Arcanist plugin (#5106)
  completion: zsh: improve main function selection
  gitfast: fix the prompt colour
  gitfast: update to upstream v2.8
  Add alias for oneline git tree with --all option
  gitfast: update to upstream v2.4
  gitfast: update to upstream v2.0
  znt: update to v2.1.15
  Add rbenv support for ruby version display
  Fix deprecated usage (#5050)
  Add 'gcn!' for the '--no-edit' option. (#4830)
  Add mvn options to ignore test failures (#5092)
  Add README to meteor plugin
  Add meteor plugin aliases
  ...
db910ec
@freecastle freecastle added a commit to freecastle/oh-my-zsh that referenced this issue May 24, 2016
@freecastle freecastle Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
* 'master' of https://github.com/robbyrussell/oh-my-zsh: (33 commits)
  added assembly alias (#5107)
  Fix styling in cakephp3 completion
  Better cake3 completion
  Change vim command to $EDITOR for consistency (#5063)
  fixed bower completion error from issue #2694 (#5056)
  vagrant snapshot (#5032)
  Arcanist plugin (#5106)
  completion: zsh: improve main function selection
  gitfast: fix the prompt colour
  gitfast: update to upstream v2.8
  Add alias for oneline git tree with --all option
  gitfast: update to upstream v2.4
  gitfast: update to upstream v2.0
  znt: update to v2.1.15
  Add rbenv support for ruby version display
  Fix deprecated usage (#5050)
  Add 'gcn!' for the '--no-edit' option. (#4830)
  Add mvn options to ignore test failures (#5092)
  Add README to meteor plugin
  Add meteor plugin aliases
  ...
471cce8
@fmauch fmauch pushed a commit to fmauch/oh-my-zsh that referenced this issue May 27, 2016
@jordantwombly jordantwombly + Felix Mauch fixed bower completion error from issue #2694 (#5056) 21241d4
@foobacca foobacca pushed a commit to foobacca/oh-my-zsh that referenced this issue May 28, 2016
Hamish Downer Merge remote-tracking branch 'upstream/master' into personal
* upstream/master:
  Add zsh completion plugin for rustc (#3159)
  Changd `alias gsta='git stash'` to `alias gsta='git stash save'`.
  added assembly alias (#5107)
  Fix styling in cakephp3 completion
  Better cake3 completion
  Change vim command to $EDITOR for consistency (#5063)
  fixed bower completion error from issue #2694 (#5056)
  vagrant snapshot (#5032)
  Arcanist plugin (#5106)
  completion: zsh: improve main function selection
  gitfast: fix the prompt colour
  gitfast: update to upstream v2.8
  Add alias for oneline git tree with --all option
  gitfast: update to upstream v2.4
  gitfast: update to upstream v2.0
  znt: update to v2.1.15
  Add rbenv support for ruby version display
  Added fossil plugin.
  JIRA Plugin will open rapidboard instead of dashboard if JIRA_RAPID_BOARD is true
5aab00b
@lesterchan lesterchan added a commit to lesterchan/oh-my-zsh that referenced this issue Jun 4, 2016
@lesterchan lesterchan Merge remote-tracking branch 'upstream/master'
* upstream/master: (40 commits)
  Fix arcanist aliases (#5110)
  add plugin react-native (#4606)
  installer: fix ordering of cygwin msys git check (#4557)
  Use default branch on recently created Mercurial repository. (#4985)
  Add zsh completion plugin for rustc (#3159)
  Changd `alias gsta='git stash'` to `alias gsta='git stash save'`.
  added assembly alias (#5107)
  Fix styling in cakephp3 completion
  Better cake3 completion
  Change vim command to $EDITOR for consistency (#5063)
  fixed bower completion error from issue #2694 (#5056)
  vagrant snapshot (#5032)
  Arcanist plugin (#5106)
  completion: zsh: improve main function selection
  gitfast: fix the prompt colour
  gitfast: update to upstream v2.8
  Add alias for oneline git tree with --all option
  gitfast: update to upstream v2.4
  gitfast: update to upstream v2.0
  znt: update to v2.1.15
  ...
ea45d26
@rakeshbala rakeshbala pushed a commit to rakeshbala/oh-my-zsh that referenced this issue Jun 6, 2016
@jordantwombly jordantwombly + Rakesh Balasubramanian fixed bower completion error from issue #2694 (#5056) daf6a3e
@neiljdo neiljdo added a commit to neiljdo/oh-my-zsh that referenced this issue Jun 8, 2016
@neiljdo neiljdo Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
* 'master' of https://github.com/robbyrussell/oh-my-zsh: (69 commits)
  Fix: Plugin knife: Add relative local path for commands which upload files (#4240)
  Add list-timers to systemd user commands (#5099)
  Adds ReactNative plugin 📱 (#5018)
  Fix arcanist aliases (#5110)
  add plugin react-native (#4606)
  installer: fix ordering of cygwin msys git check (#4557)
  Use default branch on recently created Mercurial repository. (#4985)
  Add zsh completion plugin for rustc (#3159)
  Changd `alias gsta='git stash'` to `alias gsta='git stash save'`.
  added assembly alias (#5107)
  Fix styling in cakephp3 completion
  Better cake3 completion
  Change vim command to $EDITOR for consistency (#5063)
  fixed bower completion error from issue #2694 (#5056)
  vagrant snapshot (#5032)
  Arcanist plugin (#5106)
  completion: zsh: improve main function selection
  gitfast: fix the prompt colour
  gitfast: update to upstream v2.8
  Add alias for oneline git tree with --all option
  ...
62f8d4d
@NathanSDunn NathanSDunn added a commit to NathanSDunn/oh-my-zsh that referenced this issue Jun 16, 2016
@jordantwombly @NathanSDunn jordantwombly + NathanSDunn fixed bower completion error from issue #2694 (#5056) 218757d
@atsuya atsuya added a commit to atsuya/oh-my-zsh that referenced this issue Jul 23, 2016
@jordantwombly @atsuya jordantwombly + atsuya fixed bower completion error from issue #2694 (#5056) 0f1655a
@fdelacruz fdelacruz added a commit to fdelacruz/oh-my-zsh that referenced this issue Jul 31, 2016
@jordantwombly @fdelacruz jordantwombly + fdelacruz fixed bower completion error from issue #2694 (#5056) 853e556
@M157q M157q added a commit to M157q/oh-my-zsh that referenced this issue Sep 9, 2016
@jordantwombly @M157q jordantwombly + M157q fixed bower completion error from issue #2694 (#5056) 14e848c
@jzdxeb jzdxeb pushed a commit to jzdxeb/oh-my-zsh that referenced this issue Sep 27, 2016
@jordantwombly @robbyrussell jordantwombly + fixed bower completion error from issue #2694 (#5056) 85af354
@DennisDenuto DennisDenuto added a commit to DennisDenuto/oh-my-zsh that referenced this issue Oct 29, 2016
@jordantwombly @DennisDenuto jordantwombly + DennisDenuto fixed bower completion error from issue #2694 (#5056) a237936
@avleen avleen added a commit to avleen/oh-my-zsh that referenced this issue Dec 23, 2016
@jordantwombly @avleen jordantwombly + avleen fixed bower completion error from issue #2694 (#5056) 0c9a264
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment