summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command/_mpc
diff options
context:
space:
mode:
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() {