REGISTER-PYTHON-ARGCOMPLETE(1)

πŸ“¦
version 3.7.0 Β· 2 versions
, in debian trixie, ubuntu noble, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸŽ€ REGISTER-PYTHON-ARGCOMPLETE(1) πŸŽ€ User Commands

✨ NAME ✨

okay so register-python-argcomplete is the argcomplete module's utility script πŸ’– it's literally the thing that makes tab completion work for your Python scripts 🫢

πŸ’… DESCRIPTION πŸ’…

Here's the vibe. The usage line looks like this:

usage: register-python-argcomplete [-h] [--no-defaults]
       [--complete-arguments ...]
       [-s {bash,zsh,tcsh,fish,powershell}] [-e
       EXTERNAL_ARGCOMPLETE_SCRIPT] executable [executable ...]

Its whole job is to register a Python executable so the argcomplete module can handle its completions πŸ”₯

To actually register it, you source the output of this script in your bash shell 🐚 and make sure you quote the output so nothing gets interpolated weirdly πŸ™ˆ

Example:

$ eval "$(register-python-argcomplete my-favorite-script.py)"

For Tcsh 🌸

$ eval `register-python-argcomplete --shell tcsh my-favorite-
script.py`

For Fish 🐟

$ register-python-argcomplete --shell fish my-favourite-script.py
> ~/.config/fish/my-favourite-script.py.fish

🧚 positional arguments 🧚

executable

the executable you want to complete, but only when it gets invoked by exactly this name ✨

πŸ‘‘ options πŸ‘‘

  • -h, --help β€” shows the help message and exits πŸ’œ
  • --no-defaults β€” if no matches get generated, this stops it from falling back to readline's default completion πŸ™…β€β™€οΈ (bash only!)
  • --complete-arguments ... β€” the arguments you want to pass to complete. heads up: using this option throws out the default options πŸ—‘οΈ (bash only!)
  • -s {bash,zsh,tcsh,fish,powershell}, --shell {bash,zsh,tcsh,fish,powershell} β€” outputs the code for whichever shell you pick 🐚
  • -e EXTERNAL_ARGCOMPLETE_SCRIPT, --external-argcomplete-script EXTERNAL_ARGCOMPLETE_SCRIPT β€” points to an external argcomplete script that handles auto completion for the executable πŸ¦‹

🌈 AUTHORS 🌈

the argcomplete module was written by Andrey Kislyuk πŸ‘©β€πŸ’»βœ¨

πŸ”— SEE ALSO πŸ”—

the full documentation for the argccomplete module lives at https://argcomplete.readthedocs.org/en/latest/ πŸ“š


bestie, that's the whole thing πŸ₯ΉπŸ’– you're officially a register-python-argcomplete girlie now. this has been register-python-argcomplete 3... from November 2023, slay forever πŸ’…πŸŽ€