When trying to use the nmctl completion zsh command, it appears the autocomplete file refers to the command as netmaker instead of nmctl and as such, I can't get the autocomplete to work.
I am running this on Ubuntu 22.04 under WSL2 on Windows. I use ZSH and looked primarily at that subcommand in the nmctl tool, but it appears the other shell options behave the same way.
Run nmctl completion zsh --help to show the steps to generate the autocomplete script for the zsh shell.
The output help text already refers to the commands as netmaker instead of nmctl
Running the command from the help output to load the completions for each session, netmaker completion zsh > "${fpath[1]}/_netmaker", fails because zsh doesn't have the command netmaker
Changing the command to nmctl completion zsh > "${fpath[1]}/_netmaker" generates the _netmaker file, but a new session does not work correctly for autocompletions.
I suspect the problem is because the name of the command is different but I am not 100% sure. Let me know if there is anything else needed.
Version
v0.17.1
What OS are you using?
Linux
Relevant log output
> nmctl completion zsh --help
Generate the autocompletion script for the zsh shell.
If shell completion is not already enabled in your environment you will need
to enable it. You can execute the following once:
echo "autoload -U compinit; compinit" >> ~/.zshrc
To load completions in your current shell session:
source <(netmaker completion zsh); compdef _netmaker netmaker
To load completions for every new session, execute once:
#### Linux:
netmaker completion zsh > "${fpath[1]}/_netmaker"
#### macOS:
netmaker completion zsh > $(brew --prefix)/share/zsh/site-functions/_netmaker
You will need to start a new shell for this setup to take effect.
Usage:
netmaker completion zsh [flags]
Flags:
-h, --help help for zsh
--no-descriptions disable completion descriptions
Contact Details
No response
What happened?
When trying to use the
nmctl completion zsh
command, it appears the autocomplete file refers to the command asnetmaker
instead ofnmctl
and as such, I can't get the autocomplete to work.I am running this on Ubuntu 22.04 under WSL2 on Windows. I use ZSH and looked primarily at that subcommand in the nmctl tool, but it appears the other shell options behave the same way.
nmctl completion zsh --help
to show the steps to generate the autocomplete script for the zsh shell.netmaker
instead ofnmctl
netmaker completion zsh > "${fpath[1]}/_netmaker"
, fails because zsh doesn't have the command netmakernmctl completion zsh > "${fpath[1]}/_netmaker"
generates the _netmaker file, but a new session does not work correctly for autocompletions.I suspect the problem is because the name of the command is different but I am not 100% sure. Let me know if there is anything else needed.
Version
v0.17.1
What OS are you using?
Linux
Relevant log output
Contributing guidelines