diff --git a/scripts/completion/dvc.bash b/scripts/completion/dvc.bash index adc389e0f..21d7cdf6c 100644 --- a/scripts/completion/dvc.bash +++ b/scripts/completion/dvc.bash @@ -8,9 +8,9 @@ # - https://opensource.com/article/18/3/creating-bash-completion-script #---------------------------------------------------------- -_dvc_commands='init destroy add import checkout run pull push fetch \ - status repro remove move unprotect gc config remote metrics \ - install root lock unlock pipeline commit' +_dvc_commands='add checkout commit config destroy fetch get-url gc \ + import-url init install lock metrics move pipeline pull push \ + remote remove repro root run status unlock unprotect' _dvc_options="-h --help -v --version" _dvc_global_options="-h --help -q --quiet -V --verbose" @@ -21,7 +21,7 @@ _dvc_config="-u --unset --local --system --global" _dvc_destroy="-f --force" _dvc_fetch="--show-checksums -j --jobs -r --remote -a --all-branches -T --all-tags -d --with-deps -R --recursive" _dvc_gc="-a --all-branches -T --all-tags -c --cloud -r --remote -f --force -p --project" -_dvc_import="--resume" +_dvc_import-url="--resume-f --file" _dvc_init="--no-scm -f --force" _dvc_install="" _dvc_lock="$(compgen -G '*.dvc')" diff --git a/scripts/completion/dvc.zsh b/scripts/completion/dvc.zsh index 8bcd382ca..6a81d2a95 100644 --- a/scripts/completion/dvc.zsh +++ b/scripts/completion/dvc.zsh @@ -20,8 +20,9 @@ _dvc_commands() { "destroy:Remove DVC-files, local DVC config and data cache." "diff:Show a diff of a DVC controlled data file or a directory." "fetch:Fetch data files from a DVC remote storage." + "get-url:Download or copy files from URL." "gc:Collect unused data from DVC cache or a remote storage." - "import:Download or copy files from URL and take under DVC control." + "import-url:Download or copy file from URL and take it under DVC control." "init:Initialize DVC in the current directory." "install:Install DVC git hooks into the repository." "lock:Lock DVC-file." @@ -106,6 +107,11 @@ _dvc_fetch=( "*:Stages:_files -g '(*.dvc|Dvcfile)'" ) +_dvc_geturl=( + "1:URL:" + "2:Output:" +) + _dvc_gc=( {-a,--all-branches}"[Keep data files for the tips of all git branches.]" {-T,--all-tags}"[Keep data files for all git tags.]" @@ -116,7 +122,7 @@ _dvc_gc=( {-p,--projects}"[Keep data files required by these projects in addition to the current one.]:Repos:_files" ) -_dvc_import=( +_dvc_importurl=( "--resume[Resume previously started download.]" {-f,--file}"[Specify name of the DVC-file it generates.]:File:_files" "1:URL:" @@ -248,30 +254,31 @@ _arguments \ '*::args:->args' case $words[1] in - add) _arguments $_dvc_global_options $_dvc_add ;; - cache) _arguments $_dvc_global_options $_dvc_cache ;; - checkout) _arguments $_dvc_global_options $_dvc_checkout ;; - commit) _arguments $_dvc_global_options $_dvc_commit ;; - config) _arguments $_dvc_global_options $_dvc_config ;; - destroy) _arguments $_dvc_global_options $_dvc_destroy ;; - diff) _arguments $_dvc_global_options $_dvc_diff ;; - fetch) _arguments $_dvc_global_options $_dvc_fetch ;; - gc) _arguments $_dvc_global_options $_dvc_gc ;; - import) _arguments $_dvc_global_options $_dvc_import ;; - init) _arguments $_dvc_global_options $_dvc_init ;; - install) _arguments $_dvc_global_options $_dvc_install ;; - lock) _arguments $_dvc_global_options $_dvc_lock ;; - metrics) _arguments $_dvc_global_options $_dvc_metrics ;; - move) _arguments $_dvc_global_options $_dvc_move ;; - pipeline) _arguments $_dvc_global_options $_dvc_pipeline ;; - pull) _arguments $_dvc_global_options $_dvc_pull ;; - push) _arguments $_dvc_global_options $_dvc_push ;; - remote) _arguments $_dvc_global_options $_dvc_remote ;; - remove) _arguments $_dvc_global_options $_dvc_remove ;; - repro) _arguments $_dvc_global_options $_dvc_repro ;; - root) _arguments $_dvc_global_options $_dvc_root ;; - run) _arguments $_dvc_global_options $_dvc_run ;; - status) _arguments $_dvc_global_options $_dvc_status ;; - unlock) _arguments $_dvc_global_options $_dvc_unlock ;; - unprotect) _arguments $_dvc_global_options $_dvc_unprotect ;; + add) _arguments $_dvc_global_options $_dvc_add ;; + cache) _arguments $_dvc_global_options $_dvc_cache ;; + checkout) _arguments $_dvc_global_options $_dvc_checkout ;; + commit) _arguments $_dvc_global_options $_dvc_commit ;; + config) _arguments $_dvc_global_options $_dvc_config ;; + destroy) _arguments $_dvc_global_options $_dvc_destroy ;; + diff) _arguments $_dvc_global_options $_dvc_diff ;; + fetch) _arguments $_dvc_global_options $_dvc_fetch ;; + get-url) _arguments $_dvc_global_options $_dvc_geturl ;; + gc) _arguments $_dvc_global_options $_dvc_gc ;; + import-url) _arguments $_dvc_global_options $_dvc_importurl ;; + init) _arguments $_dvc_global_options $_dvc_init ;; + install) _arguments $_dvc_global_options $_dvc_install ;; + lock) _arguments $_dvc_global_options $_dvc_lock ;; + metrics) _arguments $_dvc_global_options $_dvc_metrics ;; + move) _arguments $_dvc_global_options $_dvc_move ;; + pipeline) _arguments $_dvc_global_options $_dvc_pipeline ;; + pull) _arguments $_dvc_global_options $_dvc_pull ;; + push) _arguments $_dvc_global_options $_dvc_push ;; + remote) _arguments $_dvc_global_options $_dvc_remote ;; + remove) _arguments $_dvc_global_options $_dvc_remove ;; + repro) _arguments $_dvc_global_options $_dvc_repro ;; + root) _arguments $_dvc_global_options $_dvc_root ;; + run) _arguments $_dvc_global_options $_dvc_run ;; + status) _arguments $_dvc_global_options $_dvc_status ;; + unlock) _arguments $_dvc_global_options $_dvc_unlock ;; + unprotect) _arguments $_dvc_global_options $_dvc_unprotect ;; esac