First check
Description
I have built a CLI with with Typer and have been really enjoying using this library. I am looking to setup the auto complete feature but have run into something unexpected. When installing my package, running --install-completion, and restarting the terminal it would "auto complete" to files/dirs in my current directory (not expected behavior). To test whether there was something mis-configured on my end I tested the auto complete or the Typer CLI by running typer --[TAB][TAB] which did not auto complete to anything.
I'm not sure if there is something wrong with my environment, Typer CLI, my code, or misunderstanding how auto-completion works.
Additional context
I am on OSX and have noticed naming conflict with another program called typer.
I have tested auto complete on this code that I have run with typer [name.py] run --[TAB][TAB]
import typer
def main(name: str = typer.Option("World", help="The name to say hi to.")):
typer.echo(f"Hello {name}")
if __name__ == "__main__":
typer.run(main
Here is the bottom of my .zshrc. I can confirm
# tabtab source for packages
# uninstall by removing these lines
[[ -f ~/.config/tabtab/__tabtab.zsh ]] && . ~/.config/tabtab/__tabtab.zsh || true
autoload -Uz compinit
zstyle ':completion:*' menu select
fpath+=~/.zfunc
Happy to post my full zshrc if it would help!
Can Also confirm that zfunc _typer exists
#compdef typer
_typer_completion() {
eval $(env _TYPER_COMPLETE_ARGS="${words[1,$CURRENT]}" _TYPER_COMPLETE=complete_zsh typer)
}
compdef _typer_completion typer%
First check
Description
I have built a CLI with with Typer and have been really enjoying using this library. I am looking to setup the auto complete feature but have run into something unexpected. When installing my package, running --install-completion, and restarting the terminal it would "auto complete" to files/dirs in my current directory (not expected behavior). To test whether there was something mis-configured on my end I tested the auto complete or the Typer CLI by running
typer --[TAB][TAB]which did not auto complete to anything.I'm not sure if there is something wrong with my environment, Typer CLI, my code, or misunderstanding how auto-completion works.
Additional context
I am on OSX and have noticed naming conflict with another program called typer.
I have tested auto complete on this code that I have run with
typer [name.py] run --[TAB][TAB]Here is the bottom of my .zshrc. I can confirm
Happy to post my full zshrc if it would help!
Can Also confirm that zfunc _typer exists