mirror of
https://github.com/badaix/snapcast.git
synced 2025-04-29 18:27:12 +02:00
Use -hh to show config file options
This commit is contained in:
parent
c8c1871573
commit
c977a884f7
2 changed files with 6 additions and 4 deletions
|
@ -4,10 +4,10 @@ snapserver - Snapcast server
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
\fBsnapserver\fR [\fIOPTION\fR]...
|
\fBsnapserver\fR [\fIOPTION\fR]...
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
Snapcast is a multi-room client-server audio player, where all clients are
|
Snapcast is a multiroom client-server audio player, where all clients are
|
||||||
time synchronized with the server to play perfectly synced audio. It's not a
|
time synchronized with the server to play perfectly synced audio. It's not a
|
||||||
standalone player, but an extension that turns your existing audio player into
|
standalone player, but an extension that turns your existing audio player into
|
||||||
a Sonos-like multi-room solution.
|
a Sonos-like multiroom solution.
|
||||||
.br
|
.br
|
||||||
The server's audio input is a named pipe `/tmp/snapfifo`. All data that is fed
|
The server's audio input is a named pipe `/tmp/snapfifo`. All data that is fed
|
||||||
into this file will be send to the connected clients. One of the most generic
|
into this file will be send to the connected clients. One of the most generic
|
||||||
|
@ -16,7 +16,7 @@ which can be configured to use a named pipe as audio output.
|
||||||
.SS Allowed options:
|
.SS Allowed options:
|
||||||
.TP
|
.TP
|
||||||
\fB-h, --help\fR
|
\fB-h, --help\fR
|
||||||
Produce help message
|
Produce help message, use -hh to show options from config file
|
||||||
.TP
|
.TP
|
||||||
\fB-v, --version\fR
|
\fB-v, --version\fR
|
||||||
Show version number
|
Show version number
|
||||||
|
|
|
@ -57,7 +57,7 @@ int main(int argc, char* argv[])
|
||||||
std::string config_file = "/etc/snapserver.conf";
|
std::string config_file = "/etc/snapserver.conf";
|
||||||
|
|
||||||
OptionParser op("Allowed options");
|
OptionParser op("Allowed options");
|
||||||
auto helpSwitch = op.add<Switch>("h", "help", "Produce help message");
|
auto helpSwitch = op.add<Switch>("h", "help", "Produce help message, use -hh to show options from config file");
|
||||||
auto groffSwitch = op.add<Switch, Attribute::hidden>("", "groff", "produce groff message");
|
auto groffSwitch = op.add<Switch, Attribute::hidden>("", "groff", "produce groff message");
|
||||||
auto versionSwitch = op.add<Switch>("v", "version", "Show version number");
|
auto versionSwitch = op.add<Switch>("v", "version", "Show version number");
|
||||||
#ifdef HAS_DAEMON
|
#ifdef HAS_DAEMON
|
||||||
|
@ -157,6 +157,8 @@ int main(int argc, char* argv[])
|
||||||
if (helpSwitch->is_set())
|
if (helpSwitch->is_set())
|
||||||
{
|
{
|
||||||
cout << op << "\n";
|
cout << op << "\n";
|
||||||
|
if (helpSwitch->count() > 1)
|
||||||
|
cout << conf << "\n";
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue