From c82c80d031d50e445bda7c02adbd3e97a635cde6 Mon Sep 17 00:00:00 2001 From: Minijackson Date: Thu, 2 Aug 2018 14:08:35 +0200 Subject: Put "syntax" at the bottom --- sinksh/syntax_modules/sink_stat.cpp | 38 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 20 deletions(-) (limited to 'sinksh/syntax_modules/sink_stat.cpp') diff --git a/sinksh/syntax_modules/sink_stat.cpp b/sinksh/syntax_modules/sink_stat.cpp index 235558f..a936af2 100644 --- a/sinksh/syntax_modules/sink_stat.cpp +++ b/sinksh/syntax_modules/sink_stat.cpp @@ -36,26 +36,6 @@ namespace SinkStat { -bool stat(const QStringList &args, State &state); - -Syntax::List syntax() -{ - Syntax state("stat", QObject::tr("Shows database usage for the resources requested"), - &SinkStat::stat, Syntax::NotInteractive); - - state.addPositionalArgument({ .name = "resourceId", - .help = "Show statistics of the given resource(s). If no resource is provided, show " - "statistics of all resources", - .required = false, - .variadic = true }); - - state.completer = &SinkshUtils::resourceCompleter; - - return Syntax::List() << state; -} - -REGISTER_SYNTAX(SinkStat) - void statResource(const QString &resource, const State &state) { state.printLine("Resource " + resource + ":"); @@ -119,4 +99,22 @@ bool stat(const QStringList &args, State &state) return false; } +Syntax::List syntax() +{ + Syntax state("stat", QObject::tr("Shows database usage for the resources requested"), + &SinkStat::stat, Syntax::NotInteractive); + + state.addPositionalArgument({ .name = "resourceId", + .help = "Show statistics of the given resource(s). If no resource is provided, show " + "statistics of all resources", + .required = false, + .variadic = true }); + + state.completer = &SinkshUtils::resourceCompleter; + + return Syntax::List() << state; +} + +REGISTER_SYNTAX(SinkStat) + } -- cgit v1.2.3