Lopsub fails to parse the command line if one or more arguments are
given, allowing to remove the check from the command handler.
The commit also extends the help text of the subcommand to mention
that the colon key can also be used to return to input mode.
as first argument, it prints the description of this command.
[/description]
+[subcommand fg]
+ purpose = enter command mode
+ [description]
+ In this mode, file name and play time of the current audio file are
+ displayed. Hit CTRL+C or : to switch to input mode.
+ [/description]
return 0;
}
-static int com_fg(struct play_task *pt, int argc, __a_unused char **argv)
+static int com_fg(struct play_task *pt,
+ __a_unused struct lls_parse_result *lpr)
{
- if (argc != 1)
- return -E_PLAY_SYNTAX;
pt->background = false;
return 0;
}
+EXPORT_PLAY_CMD_HANDLER(fg);
static int com_bg(struct play_task *pt, int argc, __a_unused char **argv)
{
U: prev
H: Closes the current file and loads the previous file of the playlist.
---
-N: fg
-D: Enter command mode.
-U: fg
-H: In this mode, file name and play time are displayed. Hit CTRL+C to switch to
-H: input mode.
----
N: bg
D: Enter input mode.
U: bg