mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-11 15:28:27 +01:00
completion: autogenerate (#3921)
* cli: split main_parser * cli: basic parser tree printing * cli: major completion tidy * completion: more missing root commands * completion: much automagic such beauty - fixes #2985 automatically generate bash completion * tests: bash completion * tests: completion: tidy script a little * minor tidy * command: positional name consistency * completion: bash: add logging * double-check renames and consistency * cli: add completion subcommand * ci: completion: update test * minor logging * more completion logging verbosity * fix completion of files * add shtab * purge unneeded completion => shtab * completion: neaten UI * completion: use `shtab>=0.0.2` * completion: purge hardcoded completions! * revert unneeded renames for now * fix isort * completion: tidy CLI API * fix snap build * fix snap build again * snap: internally build completion * allow repo-less completion * command: tidy headless logic * use CmdBaseNoRepo * better DVC-file completion * merge command.choices -> command.completion * drop choices class * remove completion optionals * tidy docs
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import argparse
|
||||
import logging
|
||||
|
||||
from dvc.command import completion
|
||||
from dvc.command.base import CmdBase, append_doc_link
|
||||
from dvc.exceptions import DvcException
|
||||
|
||||
@@ -66,5 +67,6 @@ def add_parser(subparsers, parent_parser):
|
||||
nargs="*",
|
||||
help="DVC-files to commit. Optional. "
|
||||
"(Finds all DVC-files in the workspace by default.)",
|
||||
choices=completion.Optional.DVC_FILE,
|
||||
)
|
||||
commit_parser.set_defaults(func=CmdCommit)
|
||||
|
||||
Reference in New Issue
Block a user