about summary refs log tree commit diff stats
path: root/pkgs/by-name/mp/mpc-beetrm/mpc-beetrm.sh
diff options
context:
space:
mode:
authorBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-11 13:43:40 +0200
committerBenedikt Peetz <benedikt.peetz@b-peetz.de>2024-08-11 14:03:45 +0200
commit9207419322db99e4d565d1409028175e1403be14 (patch)
tree189313c9ee09f36f1b2731b422857ad36fc3cea9 /pkgs/by-name/mp/mpc-beetrm/mpc-beetrm.sh
parentfeat(home/beets): Init the xtractor plugin (diff)
downloadnixos-config-9207419322db99e4d565d1409028175e1403be14.tar.gz
nixos-config-9207419322db99e4d565d1409028175e1403be14.zip
fix(pkgs/mpc-rm): Rename to `mpc-beetrm`
This avoids shadowing the original `mpc rm` command
Diffstat (limited to 'pkgs/by-name/mp/mpc-beetrm/mpc-beetrm.sh')
-rwxr-xr-xpkgs/by-name/mp/mpc-beetrm/mpc-beetrm.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/pkgs/by-name/mp/mpc-beetrm/mpc-beetrm.sh b/pkgs/by-name/mp/mpc-beetrm/mpc-beetrm.sh
new file mode 100755
index 00000000..3209503c
--- /dev/null
+++ b/pkgs/by-name/mp/mpc-beetrm/mpc-beetrm.sh
@@ -0,0 +1,11 @@
+#!/usr/bin/env dash
+
+# shellcheck source=/dev/null
+SHELL_LIBRARY_VERSION="2.1.2" . %SHELL_LIBRARY_PATH
+
+beet remove --delete \
+    title:"$(mpc --format '%title%' current)" \
+    album:"$(mpc --format '%album%' current)"
+mpc del 0
+
+# vim: ft=sh