mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-10 07:36:41 +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
|
@ -57,7 +57,7 @@ int main(int argc, char* argv[])
|
|||
std::string config_file = "/etc/snapserver.conf";
|
||||
|
||||
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 versionSwitch = op.add<Switch>("v", "version", "Show version number");
|
||||
#ifdef HAS_DAEMON
|
||||
|
@ -157,6 +157,8 @@ int main(int argc, char* argv[])
|
|||
if (helpSwitch->is_set())
|
||||
{
|
||||
cout << op << "\n";
|
||||
if (helpSwitch->count() > 1)
|
||||
cout << conf << "\n";
|
||||
exit(EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue