From 6aa15f57fd5bee298c8320dab19d167dac3d46ed Mon Sep 17 00:00:00 2001 From: Oliver Kiddle Date: Wed, 22 Nov 2023 00:07:37 +0100 Subject: 52315: completion options update --- Completion/Unix/Command/_mpc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_mpc') diff --git a/Completion/Unix/Command/_mpc b/Completion/Unix/Command/_mpc index 7f7adc7b4..c3f93878c 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" @@ -205,6 +207,10 @@ _mpc_add() { _mpc_helper_files } +_mpc_albumart() { + _mpc_helper_files +} + _mpc_del() { _mpc_helper_songnumbers } @@ -304,8 +310,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() { -- cgit v1.2.3 From ec8fc4024f5be0a76f5604ddc18380c7053d2649 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Tue, 12 Nov 2024 19:48:56 -0800 Subject: Karel Balej: 53240, 53241: updated completions for mpc add, mpc insert --- ChangeLog | 5 +++++ Completion/Unix/Command/_mpc | 16 +++++++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) (limited to 'Completion/Unix/Command/_mpc') diff --git a/ChangeLog b/ChangeLog index 22ee71a4e..e72294ce1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2024-11-12 Bart Schaefer + + * Karel Balej: 53240, 53241: Completion/Unix/Command/_mpc: + updated completions for mpc add, mpc insert + 2024-11-12 Jun-ichi Takimoto * 53137 + 53213: Doc/Makefile.in, Doc/intro.ms, allow creating diff --git a/Completion/Unix/Command/_mpc b/Completion/Unix/Command/_mpc index c3f93878c..e3383e56d 100644 --- a/Completion/Unix/Command/_mpc +++ b/Completion/Unix/Command/_mpc @@ -178,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 @@ -204,7 +214,11 @@ _mpc_helper_outputs() { } _mpc_add() { - _mpc_helper_files + _mpc_helper_all_files +} + +_mpc_insert() { + _mpc_helper_all_files } _mpc_albumart() { -- cgit v1.2.3