You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 18, 2022. It is now read-only.
.bashrc vs .bash_profile: Click needs those lines to be placed explicitly in .bashrc (used for interactive login shells), not .bash_profile. Some MAC users may only have .bash_profile (because MacOS always runs .bash_profile for new terminal windows) so .bashrc should be created if it does not exist.
zsh completion: Click 6.x.x does not include ZSH completion in its docs (the latest stable release, 7.x, does, but carto-cli is currently running version 6.7). However, it works just fine, with a small caveat: the same line must be placed in .zshrc as in .bashrc, which uses source instead of source_zsh (at least on MacOS).
Shell activation time: As stated in the Click docs, in order for this to work each shell has to invoke each application on startup, which can cause slowdowns (not that I've seen since all these applications are pretty lightweight). Anyhow, the option of including an Activation Script and then calling that from .bashrc/.zshrc is also feasible.
Activating this simple feature seems like pretty low-hanging fruit and I think that current and future users would appreciate it considerably, given the high amount of sub-commands and arguments for each application. I'd be happy to help with this if needed!
The text was updated successfully, but these errors were encountered:
Thanks @arredond I've tried on bash and works very nicely!! On zsh is not working but I think it's worth (and healthy) to update to click 7 so I'll try first that one and update the docs conveniently to help users to get this very convenient feature!
Click has built-in support for simple Bash/ZSH completion of subcommands and arguments.
Activation is as simple as adding a couple of lines to
.bashrc
or.zshrc
. In this case, one for each program:Some notes:
.bashrc vs .bash_profile: Click needs those lines to be placed explicitly in
.bashrc
(used for interactive login shells), not.bash_profile
. Some MAC users may only have.bash_profile
(because MacOS always runs.bash_profile
for new terminal windows) so.bashrc
should be created if it does not exist.zsh completion: Click 6.x.x does not include ZSH completion in its docs (the latest stable release, 7.x, does, but
carto-cli
is currently running version 6.7). However, it works just fine, with a small caveat: the same line must be placed in.zshrc
as in.bashrc
, which usessource
instead ofsource_zsh
(at least on MacOS).Shell activation time: As stated in the Click docs, in order for this to work each shell has to invoke each application on startup, which can cause slowdowns (not that I've seen since all these applications are pretty lightweight). Anyhow, the option of including an Activation Script and then calling that from
.bashrc
/.zshrc
is also feasible.Activating this simple feature seems like pretty low-hanging fruit and I think that current and future users would appreciate it considerably, given the high amount of sub-commands and arguments for each application. I'd be happy to help with this if needed!
The text was updated successfully, but these errors were encountered: