diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-03 22:43:54 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-08-03 22:43:54 +0200 |
commit | 256b5beb89d2c67d74d80a6f1a0f0dad074911e3 (patch) | |
tree | 23326dfe10e290417f823803c75628327f727636 /sinksh/syntax_modules/sink_stat.cpp | |
parent | 50bed81038f10091d35c5719df8078612393ae95 (diff) | |
download | sink-256b5beb89d2c67d74d80a6f1a0f0dad074911e3.tar.gz sink-256b5beb89d2c67d74d80a6f1a0f0dad074911e3.zip |
Removed the use of C99 extensions
Diffstat (limited to 'sinksh/syntax_modules/sink_stat.cpp')
-rw-r--r-- | sinksh/syntax_modules/sink_stat.cpp | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/sinksh/syntax_modules/sink_stat.cpp b/sinksh/syntax_modules/sink_stat.cpp index a936af2..202d1ce 100644 --- a/sinksh/syntax_modules/sink_stat.cpp +++ b/sinksh/syntax_modules/sink_stat.cpp | |||
@@ -101,17 +101,9 @@ bool stat(const QStringList &args, State &state) | |||
101 | 101 | ||
102 | Syntax::List syntax() | 102 | Syntax::List syntax() |
103 | { | 103 | { |
104 | Syntax state("stat", QObject::tr("Shows database usage for the resources requested"), | 104 | Syntax state("stat", QObject::tr("Shows database usage for the resources requested"), &SinkStat::stat, Syntax::NotInteractive); |
105 | &SinkStat::stat, Syntax::NotInteractive); | 105 | state.addPositionalArgument({"resourceId", "Show statistics of the given resource(s). If no resource is provided, show statistics of all resources", false, true}); |
106 | |||
107 | state.addPositionalArgument({ .name = "resourceId", | ||
108 | .help = "Show statistics of the given resource(s). If no resource is provided, show " | ||
109 | "statistics of all resources", | ||
110 | .required = false, | ||
111 | .variadic = true }); | ||
112 | |||
113 | state.completer = &SinkshUtils::resourceCompleter; | 106 | state.completer = &SinkshUtils::resourceCompleter; |
114 | |||
115 | return Syntax::List() << state; | 107 | return Syntax::List() << state; |
116 | } | 108 | } |
117 | 109 | ||