shtab icon indicating copy to clipboard operation
shtab copied to clipboard

↔️ Automagic shell tab completion for Python CLI applications

Results 57 shtab issues
Sort by recently updated
recently updated
newest added

```shell ❯ aria2c -o pathcomplete https://raw.githubusercontent.com/iterative/shtab/master/examples/pathcomplete.py ❯ chmod +x pathcomplete ❯ ./pathcomplete -s zsh > ~/.local/share/zinit/_pathcomplete ❯ compinit ❯ pathcomplete # nothing ❯ pathcomplete - option --dir --help show this...

Actual behaviour: ``` "--print-completion[print shell completion script]:print_completion:(bash zsh tcsh)" ``` Expected behaviour: ``` "(- : *)--print-completion[print shell completion script]:print_completion:(bash zsh tcsh)" ```

``` parser.add_argument( "script_args", nargs="*", help="Arguments to pass to script or module", ) ``` for `nargs="*"`, generate `'*::: :->XXX'` for zsh ``` parser.add_argument( "script_args", nargs=argparse.REMAINDER, help="Arguments to pass to script or...

I notice shtab.main.get_main_parser don't use `shtab.add_argument_to`. Can it do?

zsh/fish support choices with description, like: ``` ❯ pip download -- implementation cp cpython ip ironpython jy jython pp pypy py implementation-agnostic ``` ## A new feature ```python parser.add_argument("--implementation", choices=["py",...

enhancement

First line of zsh completion script must be `compdef program_name`. zsh support `compdef -P a_glob_expr`, such as `compdef pip-cache -P pip[0-9.]#` will let this completion script support `pip-cache`, `pip`, `pip3`,...

enhancement
shell-zsh

- fixes #163 [`diff` *sans* whitespace](https://github.com/iterative/shtab/pull/164/files?w=1)

enhancement
shell-bash
external-request

All arguments following "--" in argparse are treated as positional arguments. e.g. ```shell compgen -W "foo bar baz" -- b ``` As far as I can tell shtab doesn't treat...

enhancement
shell-bash
external-request

updates: - [github.com/PyCQA/flake8: 6.1.0 → 7.0.0](https://github.com/PyCQA/flake8/compare/6.1.0...7.0.0)

**This is a dirty experimental trial.** It may not satisfy code style, etc. I want to use this branch to demo and discuss the issue about can we add a...

enhancement
help-wanted
external-request