Enable Fish shell support
mainTo activate completions for the Fish shell, you can either source the output directly or create a permanent completion file.
Option 1: Direct sourcing (Session-based)
register-python-argcomplete --shell fish my-awesome-script | sourceOption 2: Create a completion file (Permanent)
register-python-argcomplete --shell fish my-awesome-script > ~/.config/fish/completions/my-awesome-script.fishUsing absolute paths
If your script is called via a path (e.g., ./my-awesome-script), you must register it using its absolute path:
register-python-argcomplete --shell fish $(realpath ./my-awesome-script) > ~/.config/fish/completions/my-awesome-script.fish
# Note: You must manually source path-based completions
source ~/.config/fish/completions/my-awesome-script.fishDisabling completion descriptions
By default, help strings are added as completion descriptions. To disable this, remove the _ARGCOMPLETE_DFS variable from the output:
register-python-argcomplete --shell fish my-awesome-script | grep -v _ARGCOMPLETE_DFS | sourceregister-python-argcomplete --shell fish my-awesome-script | source