From: Andre Noll Date: Thu, 27 Dec 2007 14:13:12 +0000 (+0100) Subject: Change syntax for selecting moods or playlists. X-Git-Tag: v0.3.0~31 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=f010019b9e89b814699bd6a94edaa8cde9cbd45c;p=paraslash.git 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. --- 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" #~~~~~~~~~~~~~~~~~~~~