-
Notifications
You must be signed in to change notification settings - Fork 667
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
molecule zsh completion support is broken #2028
Comments
@codequokka Thanks for the suggestion, I've changed this to In Ansible this was done by using |
👍 👍 👍 |
@gundalow Thank you for replying. |
It works in my case, however it doesn't complete arguments for commands (this is intended I guess). # ZSH version
zsh --version
zsh 5.6.2 (x86_64-redhat-linux-gnu)
# Molecule version
molecule --version
molecule, version 2.20.1
# Autocomplete commands starting on `l`
molecule l<TAB>
lint -- Lint the role.
list -- Lists status of instances.
login -- Log in to one instance.
# Autocomplete arguments for command `test`
molecule test<TAB>
Completing file
/etc /home ... Edit: |
Oh nice, can you confirm @codequokka? |
It works! $ eval "$(_MOLECULE_COMPLETE=source molecule)"
basename: illegal option -- z
usage: basename string [suffix]
basename [-a] [-s suffix] string [...]
$ molecule l<TAB>
lint -- Lint the role.
list -- Lists status of instances.
login -- Log in to one instance. I found this error is caused basename command has no '-z' option on macOS. $ zsh --version
zsh 5.7.1 (x86_64-apple-darwin18.2.0)
$ basename -z
basename: illegal option -- z
usage: basename string [suffix]
basename [-a] [-s suffix] string [...] It seems to me that this workaround only uses bash completion script on zsh.
So, I do not know this is the essential solution for this issue. |
Just tried |
I can only confirm that completion does not work for me on zsh/macos with either of the documented commands, I endup gettin something like As I do not have time to dig into this I will be more than happy to review and manually test a PR that is fixing it. I suspect is has something to do with the first line out debug output which looks like:
Maybe this is where the |
Issue Type
Molecule and Ansible details
Molecule installation method (one of):
Ansible installation method (one of):
Detail any linters or test runners used:
Desired Behavior
As fish and bash completion support, zsh also should have same one.
Actual Behaviour
Zsh has no completion in pressing tab.
The text was updated successfully, but these errors were encountered: