-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zsh sub-subcommand recursion #33
Comments
works for me?
|
@casperdcl, it's about sub-subcommand autocompletion as shtab does not recurse on them. $ dvc exp show -<TAB>
--help -h -- show this help message and exit
--quiet -q -- Be quiet.
--verbose -v -- Be verbose. As you can see, it's only listing flags on the parent parser, whereas options:
-h, --help show this help message and exit
-q, --quiet Be quiet.
-v, --verbose Be verbose.
-a, --all-branches Show experiments derived from the tip of all Git
branches.
-T, --all-tags Show experiments derived from all Git tags.
-A, --all-commits Show experiments derived from all Git commits.
-n <num>, --num <num>
Show the last `num` commits from HEAD.
--no-pager Do not pipe output into a pager.
--include-metrics <metrics_list>
Include the specified metrics in output table.
--exclude-metrics <metrics_list>
Exclude the specified metrics from output table.
--include-params <params_list>
Include the specified params in output table.
--exclude-params <params_list>
Exclude the specified params from output table.
--param-deps Show only params that are stage dependencies.
--sort-by <metric/param>
Sort related experiments by the specified metric or
param.
--sort-order {asc,desc}
Sort order to use with --sort-by.
--no-timestamp Do not show experiment timestamps.
--sha Always show git commit SHAs instead of branch/tag
names.
--show-json Print output in JSON format instead of a human-
readable table.
--precision <n> Round metrics/params to `n` digits precision after the
decimal point. Rounds to 5 digits by default. I do get the autocompletion in bash: $ dvc exp show --<TAB>
--all-branches --help --num --show-json
--all-commits --include-metrics --param-deps --sort-by
--all-tags --include-params --precision --sort-order
--exclude-metrics --no-pager --quiet --verbose
--exclude-params --no-timestamp --sha |
@casperdcl, do you have any good resource/documentation on zsh autocompletion, especially something that's a bit complicated? |
None that I know of; plus I don't use I think the official docs are at https://zsh.sourceforge.io/Doc/Release/Completion-System.html Feel free to take a s(h)tab at it! |
shtab
does not seem to provide autocompletion for subcommands forzsh
, whereas it does so for thebash
. Only the parent's flags are shown (-h
/-q
/-v
in the DVC's case).shtab/shtab/__init__.py
Line 180 in a519f26
The text was updated successfully, but these errors were encountered: