lunchy: command not found : complete when using bash completion
Hello,
I have added the code for completion in my .bash_profile file and when I source it, I have the following error :
rvm/gems/ruby-2.0.0-p598/gems/lunchy-0.10.1/lib/../extras/lunchy-completion.bash:18: command not found: complete
Looks like the command used there https://github.com/eddiezane/lunchy/blob/5640b8a47720adeb085924994aaabe07c80ee212/extras/lunchy-completion.bash#L18 isn’t available on my system (OSX 10.10.4).
Thanks for your help.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 5
- Comments: 18 (4 by maintainers)
Commits related to this issue
- Merge pull request #59 from osaris/fix-bash-completion-for-zsh Add completion for ZSH ( reference #57). — committed to eddiezane/lunchy by bunnymatic 9 years ago
- Add zsh tab completion info Ref: https://github.com/eddiezane/lunchy/issues/57#issuecomment-121173592 — committed to wp-cli/cache-command by deleted user 8 years ago
- Add zsh tab completion info Ref: https://github.com/eddiezane/lunchy/issues/57#issuecomment-121173592 — committed to wp-cli/checksum-command by deleted user 8 years ago
- Add zsh tab completion info Ref: https://github.com/eddiezane/lunchy/issues/57#issuecomment-121173592 — committed to wp-cli/wp-cli-tests by deleted user 8 years ago
- Add zsh tab completion info Ref: https://github.com/eddiezane/lunchy/issues/57#issuecomment-121173592 — committed to wp-cli/eval-command by deleted user 8 years ago
- Add zsh tab completion info Ref: https://github.com/eddiezane/lunchy/issues/57#issuecomment-121173592 — committed to wp-cli/language-command by deleted user 8 years ago
- Add zsh tab completion info Ref: https://github.com/eddiezane/lunchy/issues/57#issuecomment-121173592 — committed to wp-cli/package-command by deleted user 8 years ago
- Add zsh tab completion info Ref: https://github.com/eddiezane/lunchy/issues/57#issuecomment-121173592 — committed to wp-cli/rewrite-command by deleted user 8 years ago
- Add zsh tab completion info Ref: https://github.com/eddiezane/lunchy/issues/57#issuecomment-121173592 — committed to wp-cli/role-command by deleted user 8 years ago
- Add zsh tab completion info Ref: https://github.com/eddiezane/lunchy/issues/57#issuecomment-121173592 — committed to wp-cli/shell-command by deleted user 8 years ago
- Add zsh tab completion info Ref: https://github.com/eddiezane/lunchy/issues/57#issuecomment-121173592 — committed to wp-cli/widget-command by deleted user 8 years ago
- Add zsh tab completion info Ref: https://github.com/eddiezane/lunchy/issues/57#issuecomment-121173592 — committed to wp-cli/super-admin-command by deleted user 8 years ago
- Add zsh tab completion info Ref: https://github.com/eddiezane/lunchy/issues/57#issuecomment-121173592 — committed to wp-cli/config-command by deleted user 8 years ago
- Add zsh tab completion info Ref: https://github.com/eddiezane/lunchy/issues/57#issuecomment-121173592 — committed to wp-cli/automated-tests by deleted user 8 years ago
- Add zsh tab completion info Ref: https://github.com/eddiezane/lunchy/issues/57#issuecomment-121173592 — committed to wp-cli/cron-command by deleted user 8 years ago
- Add zsh tab completion info Ref: https://github.com/eddiezane/lunchy/issues/57#issuecomment-121173592 — committed to wp-cli/db-command by deleted user 8 years ago
- Add zsh tab completion info Ref: https://github.com/eddiezane/lunchy/issues/57#issuecomment-121173592 — committed to wp-cli/export-command by deleted user 8 years ago
- Add zsh tab completion info Ref: https://github.com/eddiezane/lunchy/issues/57#issuecomment-121173592 — committed to wp-cli/import-command by deleted user 8 years ago
- Add zsh tab completion info Ref: https://github.com/eddiezane/lunchy/issues/57#issuecomment-121173592 — committed to wp-cli/media-command by deleted user 8 years ago
- Add zsh tab completion info Ref: https://github.com/eddiezane/lunchy/issues/57#issuecomment-121173592 — committed to wp-cli/scaffold-command by deleted user 8 years ago
zsh have a bash completion script compatibility mode, you need to run :
before sourcing the bash completion file. I have tested it and it works partially (listing the lunchy command is ok but not listing of the plist files).
I’ll investigate and try to find a solution to have a working completion for ZSH.
this is the only thing that worked for me. got it from here https://github.com/creationix/nvm/pull/1780/files
added this to the top of my
.zshrcOn top of
.zshrcworks! 👍Are you using
bashas your shell? If not, this completion script won’t help and you should probably leave it out of your profile/bashrc.If you are using
bash, do you havebash_completioninstalled? If not, or you can try installing it via homebrew.You can check to see if
bash_completionis available (assuming you have homebrew).brew listyou should see
bash_completionin the list. If not then install itbrew install bash_completionThen restart your terminal and see if that works.
If you get this far and things are still not working, let us know and we’ll try to get it figured out. Please include the version of bash, the list of brew packages.
autoload bashcompinit bashcompinit I tried this, but it didn’t work for me.
For those who were not able to make it work, just paste those two lines in your
~/.zshrcfile right before thesource filethathascompletion.bashlineMy bad, I’m using zsh 😦 Thanks for your quick answer.
This for sure worked!