Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorRobin Candau <robincandau@protonmail.com>2024-04-28 12:39:20 +0200
committerLevente Polyak <anthraxx@archlinux.org>2024-04-28 19:42:02 +0200
commita46b2d4fb7dee11fcc508c6871b86d9bff8d01ae (patch)
treea5b86f282648ae333aafd985ef9395546694648f /contrib/completion
parente828111ff7094354da6d55e1bc19d2d8decf3d6d (diff)
feat(repo): add repo clean command to remove untracked files
This introduces the `pkgctl repo clean` command which removes every untracked files from local package repositories (via `git clean`). The usage is as simple as `pkgctl repo clean [OPTION] [PATH]` (where "[PATH]" can be equal to a wildcard "*"). Component: pkgctl repo clean
Diffstat (limited to 'contrib/completion')
-rw-r--r--contrib/completion/bash/devtools.in7
-rw-r--r--contrib/completion/zsh/_devtools.in8
2 files changed, 15 insertions, 0 deletions
diff --git a/contrib/completion/bash/devtools.in b/contrib/completion/bash/devtools.in
index 5125ceb..136beef 100644
--- a/contrib/completion/bash/devtools.in
+++ b/contrib/completion/bash/devtools.in
@@ -292,6 +292,7 @@ _pkgctl_aur_drop_from_repo_opts() { _filedir -d; }
_pkgctl_repo_cmds=(
+ clean
clone
configure
create
@@ -317,6 +318,12 @@ _pkgctl_repo_clone_args__jobs_opts() { :; }
_pkgctl_repo_clone_args_j_opts() { _pkgctl_repo_clone_args__jobs_opts; }
_pkgctl_repo_clone_opts() { _devtools_completions_all_packages; }
+_pkgctl_repo_clean_args=(
+ -i --interactive
+ -n --dry-run
+ -h --help
+)
+_pkgctl_repo_clean_opts() { _filedir -d; }
_pkgctl_repo_configure_args=(
--protocol
diff --git a/contrib/completion/zsh/_devtools.in b/contrib/completion/zsh/_devtools.in
index 48ff373..65d7895 100644
--- a/contrib/completion/zsh/_devtools.in
+++ b/contrib/completion/zsh/_devtools.in
@@ -114,6 +114,7 @@ _pkgctl_aur_drop_from_repo_args=(
_pkgctl_repo_cmds=(
"pkgctl repo command"
+ "clean[Remove untracked files from the working tree]"
"clone[Clone a package repository]"
"configure[Configure a clone according to distro specs]"
"create[Create a new GitLab package repository]"
@@ -128,6 +129,13 @@ _pkgctl_repo_switch_args=(
'*:git_dir:_files -/'
)
+_pkgctl_repo_clean_args=(
+ '(-i --interactive)'{-i,--interactive}'[Show what would be done and clean files interactively]'
+ '(-n --dry-run)'{-n,--dry-run}"[Don't remove anything, just show what would be done]"
+ '(-h --help)'{-h,--help}'[Display usage]'
+ '*:git_dir:_files -/'
+)
+
_pkgctl_repo_clone_args=(
'(-m --maintainer=)'{-m,--maintainer=}'[Clone all packages of the named maintainer]:maintainer:'
'--protocol[Clone the repository over https]:proto:(https)'