-
Notifications
You must be signed in to change notification settings - Fork 381
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZSH .gem/ruby/2.4.0/gems/colorls-1.0.9/lib/tab_complete.sh:4: command not found: complete #149
Comments
Arch Linux doesn't offer # Sample tab completion script for Arch Linux
zle -C colorls .complete-word colorls_completion
bindkey '^x^i' colorls
# define the function that will be called
colorls_completion() {
compadd $(colorls --'*'-completion-bash="$2" )
} |
You can use bash completion scripts with ZSH this way:
|
Even better, you can have optparse generate a ZSH completion script for you:
Note: the
This way, you get nice options completion looking like this:
|
@athityakumar Is it possible to generate the |
@avdv - Nope, rubygems doesn't have the feature of doing anything automatically upon |
How about this: files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(test|spec|features)/})
end
File.open('lib/_colorls', 'w') { |f| f.puts `exe/colorls '--*-completion-zsh=colorls'` }
spec.files = files << 'lib/_colorls' |
You should add it to the |
Since #160 is merged and released in 1.1.0, this should be closed. |
Gotcha! 👍 |
Description
Zsh error after write
source $(dirname $(gem which colorls))/tab_complete.sh
in my .zshrc on Arch Linux
Thanks
The text was updated successfully, but these errors were encountered: