about summary refs log tree commit diff
path: root/_xtools
diff options
context:
space:
mode:
authorJohannes Brechtmann <johannes@jnbr.me>2018-11-10 02:24:02 +0100
committerLeah Neukirchen <leah@vuxu.org>2018-11-10 16:47:27 +0100
commit39f835989f79e4c042ee954f803142d0c8ba3bf0 (patch)
tree6c3638c098002e96595e92d42cd53065accd4d28 /_xtools
parent4e8802e93188128a3faf03fcc29a79e1595ec7f5 (diff)
downloadxtools-39f835989f79e4c042ee954f803142d0c8ba3bf0.tar.gz
xtools-39f835989f79e4c042ee954f803142d0c8ba3bf0.tar.xz
xtools-39f835989f79e4c042ee954f803142d0c8ba3bf0.zip
xbuildbarf: add zsh completion
Closes: #104 [via git-merge-pr]
Diffstat (limited to '_xtools')
-rw-r--r--_xtools17
1 files changed, 9 insertions, 8 deletions
diff --git a/_xtools b/_xtools
index 17c1f7a..88d4c8e 100644
--- a/_xtools
+++ b/_xtools
@@ -1,4 +1,4 @@
-#compdef xbulk xbump xcheckrestart xdiff xdbg xdowngrade xgensum xgrep xlg xlog xlocate xls xmindep xmypkgs xnew xoptdiff xpkg xq xrecent xrevbump xrevshlib xsrc
+#compdef xbuildbarf xbulk xbump xcheckrestart xdiff xdbg xdowngrade xgensum xgrep xlg xlog xlocate xls xmindep xmypkgs xnew xoptdiff xpkg xq xrecent xrevbump xrevshlib xsrc
 
 _xbps  # force autoload
 
@@ -6,6 +6,12 @@ _xtools_all_packages() {
 	compadd "$@" -- $(xdistdir)/srcpkgs/*(:t)
 }
 
+_xtools_one_arch() {
+	local archs=( {aarch64,armv{6,7}l,i686,x86_64}{,-musl} )
+	_arguments : \
+		":architecture:($archs)"
+}
+
 _xtools_one_template() {
 	_arguments : \
 		':available templates:_xtools_all_packages'
@@ -99,12 +105,6 @@ _xq() {
 		'*:package:_xbps_all_packages'
 }
 
-_xrecent() {
-	local archs=( {aarch64,armv{6,7}l,i686,x86_64}{,-musl} )
-	_arguments : \
-		"1::architecture:($archs)"
-}
-
 _xrevbump() {
 	_arguments : \
 		'1:message: ' \
@@ -119,6 +119,7 @@ _xsubpkg() {
 
 _xtools() {
 	case "$service" in
+		xbuildbarf) _xtools_one_arch "@";;
 		xbulk) _xbulk "$@";;
 		xbump) _xtools_one_template "$@";;
 		xcheckrestart) _xcheckrestart "$@";;
@@ -138,7 +139,7 @@ _xtools() {
 		xoptdiff) _xoptdiff "$@";;
 		xpkg) _xpkg "$@";;
 		xq) _xq "$@";;
-		xrecent) _xrecent "$@";;
+		xrecent) _xtools_one_arch "$@";;
 		xrevbump) _xrevbump "$@";;
 		xrevshlib) _xtools_one_template "$@";;
 		xsrc) _xtools_one_template "$@";;