argcomplete
argcomplete copied to clipboard
how to prevent a completer from falling back to bash filename completion?
Every script I work on has some arg that is so dynamic that it can't be completed, i.e., where no choices
can be set, nor any custom completer. It's annoying when such args trigger bash filename completion. How can I prevent that?
The weird thing is, I feel like this was solved at some point... or at least, I feel like this hasn't always been a problem. Anyone have any ideas?
Is --no-defaults
what you're looking for?
I have the same problem... I tried to create a completer that return an empty list but argcomplete always using bash completer as fallback when the complter return no options...
Is there something i am missing ?
What do you mean @evanunderscore by --no-defaults
?
Okay i found it, after some digging the default bash fallback can be disabled in the register-python-argcomplete step:
eval $(register-python-argcomplete --no-defaults my-script)
Closing this as resolved, thanks for following up. The regression in global completion should be handled in #445.