« get me outta code hell

Add --selector alias for --picker - http-music - Command-line music player + utils (not a server!)
about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLiam <towerofnix@gmail.com>2017-07-08 05:55:42 +0000
committerLiam <towerofnix@gmail.com>2017-07-08 05:55:42 +0000
commitc224db2a92208937340df1a3540212003d8c2d54 (patch)
treec295d18802be67a92a825aaf25656d152444b03f
parent9999b5db37d3edfb3106982647e8a4267bf727c6 (diff)
Add --selector alias for --picker
-rw-r--r--man/http-music.12
-rwxr-xr-xsrc/http-music.js4
2 files changed, 4 insertions, 2 deletions
diff --git a/man/http-music.1 b/man/http-music.1
index 751a397..741ff8b 100644
--- a/man/http-music.1
+++ b/man/http-music.1
@@ -99,7 +99,7 @@ Opens a specific file to be used as the playlist file.
 The default playlist file used upon loading is playlist.json (in the same directory as \fBhttp-music\fR is being run in).
 
 .TP
-.BR \-\-picker " \fIpickerType\fR"
+.BR \-\-picker ", " \-\-selector " \fIpickerType\fR"
 Sets the picker type used for selecting tracks from the active playlist.
 The default is \fBshuffle\fR.
 
diff --git a/src/http-music.js b/src/http-music.js
index e926e5d..480808d 100755
--- a/src/http-music.js
+++ b/src/http-music.js
@@ -210,13 +210,15 @@ Promise.resolve()
       'np': util => util.alias('-no-play'),
 
       '-picker': function(util) {
-        // --picker <picker type>
+        // --picker <picker type>  (alias: --selector)
         // Selects the mode that the song to play is picked.
         // See pickers.js.
 
         pickerType = util.nextArg()
       },
 
+      '-selector': util => util.alias('-picker'),
+
       '-play-opts': function(util) {
         // --play-opts <opts>
         // Sets command line options passed to the `play` command.