summaryrefslogtreecommitdiffstats
path: root/command.c
diff options
context:
space:
mode:
authorUoti Urpala <uau@mplayer2.org>2011-07-29 07:24:09 +0300
committerUoti Urpala <uau@mplayer2.org>2011-07-29 07:24:09 +0300
commit5d5ca22a6d9e87d3865ea2feb54218a6e0dfffea (patch)
tree3de73607f684c8117443d25d6c7777023723a41c /command.c
parent8bd13d50cffb82725d2f5385574782c3002903b2 (diff)
downloadmpv-5d5ca22a6d9e87d3865ea2feb54218a6e0dfffea.tar.bz2
mpv-5d5ca22a6d9e87d3865ea2feb54218a6e0dfffea.tar.xz
options: commandline: accept --foo=xyz style options
Allow writing commandline options with two leading dashes. In this mode a parameter for the option, if any, follows after a '='; following separate commandline arguments are never consumed as a parameter to a previous double-dash option. Flag options may omit parameter and behave like old single-dash syntax. "--fs=yes", "--fs=no" and "--fs" are all valid; the first two behave like configuration file "fs=yes" and "fs=no", and last is the same as old "-fs" (same effect as "--fs=yes").
Diffstat (limited to 'command.c')
-rw-r--r--command.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/command.c b/command.c
index 4b502b3cc9..cd1750ca54 100644
--- a/command.c
+++ b/command.c
@@ -3018,7 +3018,8 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
break;
case MP_CMD_LOADLIST:{
- play_tree_t *e = parse_playlist_file(mpctx->mconfig, cmd->args[0].v.s);
+ play_tree_t *e = parse_playlist_file(mpctx->mconfig,
+ bstr(cmd->args[0].v.s));
if (!e)
mp_tmsg(MSGT_CPLAYER, MSGL_ERR,
"\nUnable to load playlist %s.\n", cmd->args[0].v.s);