Closed lucathehun closed 2 weeks ago
Bash completion would be nice
Bash completion would be nice
I'll work on that tomorrow, if I got time.
Also, I'd prefer to have the completion data separate file that people can install as you show in your screenshot
Otherwise this looks good
The idea was tho add options for every shell that is gonna be implemented for it. So that u can just type
ani-cli --completion <shell>
Didn't add the last part since I just tried it with zsh for a start.
Now it should work for bash and zsh.
ani-cli --completion > _ani-cli && source _ani-cli
detects the shell automatically
The problem I have with this is that the script gets bloated 120 lines for a glorified print.
Please make these things separate files in the repo and document their use in the README
I have 2 options for you here.
One where you just need to execute the script and another one that requires you to move and source the completion file one your own. After you told me which one you like better, I'll edit the read me accordingly.
Which should it be?
Thanks, I prefer the manual way. Is the new line at the top intentional for those files btw?
Okay then I'll edit it according to that.
No I copied them from the original script and it just happens to be the case that nvim pastes under and not on the line you are on.
And one more thing... how are the people that use their package manager to install ani-cli use this now? That was the original thought behind me adding it to the main script.
I mean without doing an extra step and downloading from github anyway
Packagers could work around this, or they would need to fetch the completion info manually.
I believe this is fine, because the people that would see --completion
in help output and successfully set it up that way are the same people that will carefully read the readme anyway
Hope that it's to your liking now @port19x ! And thanks for being patient with me. 💜
Thanks for the contribution
This completion option is for zsh only at the moment, if you like what you see or have suggestions for what other shells I should make it for tell me and I'll do my best.
Really enjoying the tool itself btw 💜