aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfourtysixandtwo <fourtysixandtwo@sliderr.net>2022-10-18 18:22:58 +0100
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2022-10-20 23:32:10 +0700
commit7506adfe7da08a3e3fc1a1b99a064c57c090f83b (patch)
treea2cf8718c14cd12126d72f644fdcacdb8c2b811d
parent4901e007abbc0929c09ac0f36d05813c851d719d (diff)
multimedia/beets: Add bash/zsh completion.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r--multimedia/beets/beet2
-rw-r--r--multimedia/beets/beets.SlackBuild10
2 files changed, 11 insertions, 1 deletions
diff --git a/multimedia/beets/beet b/multimedia/beets/beet
new file mode 100644
index 000000000000..5532252f29a3
--- /dev/null
+++ b/multimedia/beets/beet
@@ -0,0 +1,2 @@
+_load_beet_completion() { eval "$(beet completion)"; }
+complete -F _load_beet_completion beet
diff --git a/multimedia/beets/beets.SlackBuild b/multimedia/beets/beets.SlackBuild
index f5e4b56b3f89..81e21583f30f 100644
--- a/multimedia/beets/beets.SlackBuild
+++ b/multimedia/beets/beets.SlackBuild
@@ -23,11 +23,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+# 20221016 46and2: Added bash/zsh completions.
+
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=beets
VERSION=${VERSION:-1.6.0}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -82,6 +84,12 @@ find -L . \
python3 setup.py install --root=$PKG
+mkdir -p $PKG/usr/share/bash-completion/completions
+install -m644 $CWD/beet $PKG/usr/share/bash-completion/completions/
+
+mkdir -p $PKG/usr/share/zsh/site-functions
+install -m644 extra/_beet $PKG/usr/share/zsh/site-functions/
+
install -D -m644 man/beet.1 $PKG/usr/man/man1/beet.1
install -D -m644 man/beetsconfig.5 $PKG/usr/man/man5/beetsconfig.5