summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command/_mpc
diff options
context:
space:
mode:
authorJoe Rayhawk <jrayhawk@fairlystable.org>2025-04-30 02:07:56 -0700
committerJoe Rayhawk <jrayhawk@fairlystable.org>2025-04-30 02:07:56 -0700
commit26e09889646be3ea65b4a3dfeda26213e4bb6a27 (patch)
tree4f3c73a9416bf47ad7e125383d23cf42879e38d7 /Completion/Unix/Command/_mpc
parent841bce705a58b04220b1f257abcc00ae71cbdbdc (diff)
parent001cba48ce3b964cf01fb3e2af54b20eacbc9bf5 (diff)
downloadzsh-26e09889646be3ea65b4a3dfeda26213e4bb6a27.tar.gz
zsh-26e09889646be3ea65b4a3dfeda26213e4bb6a27.zip
Merge branch 'upstream' into debian
Diffstat (limited to 'Completion/Unix/Command/_mpc')
-rw-r--r--Completion/Unix/Command/_mpc28
1 files changed, 27 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_mpc b/Completion/Unix/Command/_mpc
index 7f7adc7b4..e3383e56d 100644
--- a/Completion/Unix/Command/_mpc
+++ b/Completion/Unix/Command/_mpc
@@ -26,6 +26,7 @@ _mpc_command() {
mpc_cmds=(
add:"append a song to the end of the current playlist"
+ albumart:"download album art for the given song and write to stdout"
cdprev:"compact disk player-like previous command"
channels:"list the channels that other clients have subscribed to"
clear:"clear the current playlist"
@@ -57,6 +58,7 @@ _mpc_command() {
prio:"change song priorities in the queue"
queued:"show the next queued song"
random:"toggle random mode, or specify state"
+ readpicture:"download a picture from the given song and write to stdout"
repeat:"toggle repeat mode, or specify state"
single:"toggle single mode, or specify state"
consume:"toggle consume mode, or specify state"
@@ -176,6 +178,16 @@ _mpc_helper_files() {
fi
}
+(( $+functions[_mpc_helper_all_files] )) ||
+_mpc_helper_all_files() {
+ local ret=1
+ if [[ $words[CURRENT] == [/~]* ]]; then
+ _files
+ ret=$?
+ fi
+ _mpc_helper_files || return $ret
+}
+
(( $+functions[_mpc_helper_directories] )) ||
_mpc_helper_directories() {
if [[ -n $MPD_MUSIC_DIR ]]; then
@@ -202,6 +214,14 @@ _mpc_helper_outputs() {
}
_mpc_add() {
+ _mpc_helper_all_files
+}
+
+_mpc_insert() {
+ _mpc_helper_all_files
+}
+
+_mpc_albumart() {
_mpc_helper_files
}
@@ -304,8 +324,14 @@ _mpc_random() {
_mpc_helper_bool
}
+_mpc_readpicture() {
+ _mpc_helper_files
+}
+
_mpc_single() {
- _mpc_helper_bool
+ local state
+ _description states expl state
+ compadd "$@" "$expl[@]" on once off
}
_mpc_consume() {