aboutsummaryrefslogtreecommitdiff
path: root/completions
diff options
context:
space:
mode:
authorDavid O'Shaughnessy <drgibbon@users.noreply.github.com>2018-06-01 01:38:52 +1000
committerSlack Coder <slackcoder@server.ky>2024-08-16 05:43:33 -0500
commit32768f3aab56dad9c63a9e1db07fd3a1dd7adc6a (patch)
tree98c0c9fcd647de73be47d8f66ecc6f3b3890c2fc /completions
parent2e1a65c319cb2ee864b11bbf2fa2351aa6060759 (diff)
downloadsbotools-32768f3aab56dad9c63a9e1db07fd3a1dd7adc6a.tar.xz
initial commit zsh completions
Diffstat (limited to 'completions')
-rw-r--r--completions/zsh/_sbocheck14
-rw-r--r--completions/zsh/_sboclean19
-rw-r--r--completions/zsh/_sboconfig25
-rw-r--r--completions/zsh/_sbofind34
-rw-r--r--completions/zsh/_sboinstall39
-rw-r--r--completions/zsh/_sboremove18
-rw-r--r--completions/zsh/_sbosnap19
-rw-r--r--completions/zsh/_sboupgrade28
8 files changed, 196 insertions, 0 deletions
diff --git a/completions/zsh/_sbocheck b/completions/zsh/_sbocheck
new file mode 100644
index 0000000..6c1378f
--- /dev/null
+++ b/completions/zsh/_sbocheck
@@ -0,0 +1,14 @@
+#compdef sbocheck
+
+# sbotools: https://pink-mist.github.io/sbotools/
+
+_arguments \
+ '(-)'{-h,--help}'[Show help.]:' \
+ '(-)'{-v,--version}'[Show version.]:' \
+ && return 0
+
+return 1
+
+# Local Variables:
+# mode: sh
+# End:
diff --git a/completions/zsh/_sboclean b/completions/zsh/_sboclean
new file mode 100644
index 0000000..6394ed3
--- /dev/null
+++ b/completions/zsh/_sboclean
@@ -0,0 +1,19 @@
+#compdef sboclean
+
+# sbotools: https://pink-mist.github.io/sbotools/
+
+_arguments -s \
+ - info \
+ '(-)'{-h,--help}'[Show help.]:' \
+ '(-)'{-v,--version}'[Show version.]:' \
+ - commands \
+ '(-d --clean-dist)'{-d,--clean-dist}'[Clean distfiles (default /usr/sbo/distfiles).]' \
+ '(-w --clean-work)'{-w,--clean-work}'[Clean working directories (default /tmp/SBo; /tmp for compat32).]' \
+ '(-i --interactive)'{-i,--interactive}'[Ask for confirmation for each item to be removed.]' \
+ && return 0
+
+return 1
+
+# Local Variables:
+# mode: sh
+# End:
diff --git a/completions/zsh/_sboconfig b/completions/zsh/_sboconfig
new file mode 100644
index 0000000..6485f56
--- /dev/null
+++ b/completions/zsh/_sboconfig
@@ -0,0 +1,25 @@
+#compdef sboconfig
+
+# sbotools: https://pink-mist.github.io/sbotools/
+
+_arguments \
+ - info \
+ '(-)'{-h,--help}'[Show help.]:' \
+ '(-)'{-v,--version}'[Show version.]:' \
+ '(-)'{-l,--list}'[List current configuration options (including unmodified defaults).]:' \
+ - commands \
+ '(-c --noclean)'{-c,--noclean}'[If TRUE, then do not clean working directories after build.]:clean work dirs?:((TRUE\:"Clean works directories" FALSE\:"Keep work directories"))' \
+ '(-d --distclean)'{-d,--distclean}'[If TRUE, then remove source code after building.]:clean source?:((TRUE\:"Remove source" FALSE\:"Keep source"))' \
+ '(-j --jobs)'{-j,--jobs}'[Number fed to -j# for make.]:number of jobs (make):()' \
+ '(-p --pkg-dir)'{-p,--pkg-dir}'[Directory to store built packages in.]:package directory:_files -/' \
+ '(-s --sbo-home)'{-s,--sbo-home}'[Directory for SBo tree (default /usr/sbo).]:SBo home dir:_files -/' \
+ '(-o --local-overrides)'{-o,--local-overrides}'[Directory for local SlackBuild overrides.]:overrides directory:_files -/' \
+ '(-V --slackware-version)'{-V,--slackware-version}'[Use SBo repo for this version (instead of /etc/slackware-version).]:Slackware version:()' \
+ '(-r --repo)'{-r,--repo}'[Use git/rsync repo at URL instead of the SBo repo for your SLACKWARE_VERSION.]:repo URL:()' \
+ && return 0
+
+return 1
+
+# Local Variables:
+# mode: sh
+# End:
diff --git a/completions/zsh/_sbofind b/completions/zsh/_sbofind
new file mode 100644
index 0000000..9ca4bc0
--- /dev/null
+++ b/completions/zsh/_sbofind
@@ -0,0 +1,34 @@
+#compdef sbofind
+
+# sbotools: https://pink-mist.github.io/sbotools/
+
+# work out where the SBo repo is (default to /usr/sbo/repo)
+# but also check for SBO_HOME setting in /etc/sbotools/sbotools.conf
+grep 'SBO_HOME' /etc/sbotools/sbotools.conf &> /dev/null
+if [ $? -eq 0 ]; then
+ repo="$(grep 'SBO_HOME' /etc/sbotools/sbotools.conf | cut -d= -f2)/repo"
+else
+ repo='/usr/sbo/repo'
+fi
+
+# grab a listing of all slackbuilds
+slackbuilds=( ${(uf)"$(grep 'SLACKBUILD NAME: ' /usr/sbo/repo/SLACKBUILDS.TXT | cut -b 18-)"} )
+
+_arguments -s \
+ - info \
+ '(-)'{-h,--help}'[Show help information.]:' \
+ '(-)'{-v,--version}'[Show version information.]:' \
+ - commands \
+ '(-e --exact)'{-e,--exact}'[Only exact matching.]' \
+ '(-t --no-tags)'{-t,--no-tags}'[Exclude tags from search.]' \
+ '(-i --info)'{-i,--info}'[Show the contents of the .info file for each SlackBuild.]' \
+ '(-r --readme)'{-r,--readme}'[Show the contents of the README file for each SlackBuild found.]' \
+ '(-q --queue)'{-q,--queue}'[Show the build queue for each SlackBuild found.]' \
+ '(-)*:SBo SlackBuild:(${slackbuilds:|words})' \
+ && return 0
+
+return 1
+
+# Local Variables:
+# mode: sh
+# End:
diff --git a/completions/zsh/_sboinstall b/completions/zsh/_sboinstall
new file mode 100644
index 0000000..5baf368
--- /dev/null
+++ b/completions/zsh/_sboinstall
@@ -0,0 +1,39 @@
+#compdef sboinstall
+
+# sbotools: https://pink-mist.github.io/sbotools/
+
+# work out where the SBo repo is (default to /usr/sbo/repo)
+# but also check for SBO_HOME setting in /etc/sbotools/sbotools.conf
+grep 'SBO_HOME' /etc/sbotools/sbotools.conf &> /dev/null
+if [ $? -eq 0 ]; then
+ repo="$(grep 'SBO_HOME' /etc/sbotools/sbotools.conf | cut -d= -f2)/repo"
+else
+ repo='/usr/sbo/repo'
+fi
+
+# grab a listing of all slackbuilds
+slackbuilds=( ${(uf)"$(grep 'SLACKBUILD NAME: ' /usr/sbo/repo/SLACKBUILDS.TXT | cut -b 18-)"} )
+
+_arguments -s \
+ - info \
+ '(-)'{-h,--help}'[Show help]:' \
+ '(-)'{-v,--version}'[Show version information.]:' \
+ - commands \
+ '(-c --noclean)'{-c,--noclean}'[If TRUE, then do not clean working directories after build.]:clean work dirs?:((TRUE\:"Clean works directories" FALSE\:"Keep work directories"))' \
+ '(-d --distclean)'{-d,--distclean}'[If TRUE, then remove source code after building.]:clean source?:((TRUE\:"Remove source" FALSE\:"Keep source"))' \
+ '(-i --noinstall)'{-i,--noinstall}'[Do not install package after building.]' \
+ '(-j --jobs)'{-j,--jobs}'[Number fed to -j# for make.]:number of jobs (make):()' \
+ '(-p --compat32)'{-p,--compat32}'[Create a -compat32 package on x86_64 systems (experimental).]' \
+ '(-r --nointeractive)'{-r,--nointeractive}'[Skip README.]' \
+ '(-R --norequirements)'{-R,--norequirements}'[Skip requirement handling.]' \
+ '--reinstall[Asks for reinstall from the requirements.]' \
+ '(--use-template)''--create-template[Create a template for the SlackBuilds.]:Template file:()' \
+ '(--create-template)''--use-template[Use a template file (also enables -r flag).]:Template file:_files' \
+ '(-)*:SlackBuild:(${slackbuilds:|words})' \
+ && return 0
+
+return 1
+
+# Local Variables:
+# mode: sh
+# End:
diff --git a/completions/zsh/_sboremove b/completions/zsh/_sboremove
new file mode 100644
index 0000000..ebfd624
--- /dev/null
+++ b/completions/zsh/_sboremove
@@ -0,0 +1,18 @@
+#compdef sboremove
+
+# sbotools: https://pink-mist.github.io/sbotools/
+
+# get all installed SBo packages
+packages=( ${(uf)"$(ls /var/log/packages/*_SBo | cut -d'/' -f5 | rev | cut -d- -f4- | rev)"} )
+
+_arguments \
+ - info \
+ '(-)'{-h,--help}'[Show help]:' \
+ '(-)'{-v,--version}'[Show version]:' \
+ - commands \
+ '(-a --alwaysask)'{-a,--alwaysask}'[Always ask to remove requirements (even if required by installed packages).]' \
+ '(-)*:SlackBuild:(${packages:|words})'
+
+# Local Variables:
+# mode: sh
+# End:
diff --git a/completions/zsh/_sbosnap b/completions/zsh/_sbosnap
new file mode 100644
index 0000000..16b310a
--- /dev/null
+++ b/completions/zsh/_sbosnap
@@ -0,0 +1,19 @@
+#compdef sbosnap
+
+# sbotools: https://pink-mist.github.io/sbotools/
+
+local -a subcmds
+subcmds=('fetch:Download a local copy of the slackbuilds.org tree (to SBO_HOME).'
+ 'update:Update a previously fetched copy of the SBo tree.')
+_describe 'command' subcmds
+
+_arguments \
+ '(-)'{-h,--help}'[Show help.]:' \
+ '(-)'{-v,--version}'[Show version.]:' \
+ && return 0
+
+return 1
+
+# Local Variables:
+# mode: sh
+# End:
diff --git a/completions/zsh/_sboupgrade b/completions/zsh/_sboupgrade
new file mode 100644
index 0000000..bc6ff2d
--- /dev/null
+++ b/completions/zsh/_sboupgrade
@@ -0,0 +1,28 @@
+#compdef sboupgrade
+
+# sbotools: https://pink-mist.github.io/sbotools/
+
+# get a list of available upgrades
+sboupdates=( ${(uf)"$(perl -MSBO::Lib::Pkgs=get_available_updates -E 'say $_->{name} for @{ get_available_updates; }')"} )
+
+_arguments -s -C \
+ - info \
+ '(-)'{-h,--help}'[Show help]:' \
+ '(-)'{-v,--version}'[Show version information.]:' \
+ - commands \
+ '(${sboupdates})--all[Upgrade all from sbocheck.]' \
+ '(-c --noclean)'{-c,--noclean}'[If TRUE, then do not clean working directories after build.]:clean work dirs?:((TRUE\:"Clean works directories" FALSE\:"Keep work directories"))' \
+ '(-d --distclean)'{-d,--distclean}'[If TRUE, then remove source code after building.]:clean source?:((TRUE\:"Remove source" FALSE\:"Keep source"))' \
+ '(-j --jobs)'{-j,--jobs}'[Number fed to -j# for make.]:number of jobs (make):()' \
+ '(-r --nointeractive)'{-r,--nointeractive}'[Skip README.]' \
+ '(-f --force)'{-f,--force}'[Force an upgrade (ignore version).]' \
+ '(-z --force-reqs)'{-z,--force-reqs}'[Force update of requirements (use with -f).]' \
+ '(-i --noinstall)'{-i,--noinstall}'[Build package but do not install.]' \
+ '(-)*:SlackBuild:(${sboupdates:|words})' \
+ && return 0
+
+return 1
+
+# Local Variables:
+# mode: sh
+# End: