From f010019b9e89b814699bd6a94edaa8cde9cbd45c Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Thu, 27 Dec 2007 15:13:12 +0100 Subject: [PATCH] Change syntax for selecting moods or playlists. Use m/foo, p/bar instead of m:foo and p:bar. This is much friendlier to bash completion. --- afs.c | 4 ++-- server.ggo | 7 +++---- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/afs.c b/afs.c index ac7884c7..295933ec 100644 --- a/afs.c +++ b/afs.c @@ -527,10 +527,10 @@ static int activate_mood_or_playlist(char *arg, int *num_admissible) ret = change_current_mood(NULL); /* always successful */ mode = PLAY_MODE_MOOD; } else { - if (!strncmp(arg, "p:", 2)) { + if (!strncmp(arg, "p/", 2)) { ret = playlist_open(arg + 2); mode = PLAY_MODE_PLAYLIST; - } else if (!strncmp(arg, "m:", 2)) { + } else if (!strncmp(arg, "m/", 2)) { ret = change_current_mood(arg + 2); mode = PLAY_MODE_MOOD; } else diff --git a/server.ggo b/server.ggo index 650dcf0e..95e81b37 100644 --- a/server.ggo +++ b/server.ggo @@ -160,17 +160,16 @@ option "afs_initial_mode" i #~~~~~~~~~~~~~~~~~~~~~~~~~~ "Mood or playlist to load on startup. Must be -prefixed with either 'p:' or 'm:' to indicate +prefixed with either 'p/' or 'm/' to indicate whether a playlist or a mood should be loaded. Example: - --afs_initial_mode p:foo + --afs_initial_mode p/foo loads the playlist named 'foo'." - string typestr="aspecifier>:" + string typestr="/" optional - section "http sender" #~~~~~~~~~~~~~~~~~~~~ -- 2.39.5