From 944469cd390a43096b4fcf8ae95de214ff6239a9 Mon Sep 17 00:00:00 2001 From: Martin-Eckleben <1571683+Martin-Eckleben@users.noreply.github.com> Date: Sat, 5 Sep 2020 16:32:59 +0200 Subject: [PATCH] Improved documentation regarding default behavior without CLI arguments. --- README.md | 5 +++-- src/cli/commandlineparser.cpp | 5 +++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1d75f4c1..6a095723 100644 --- a/README.md +++ b/README.md @@ -74,6 +74,9 @@ ## Usage +Execute the command `flameshot` without parameters to launch a running instance of the program without taking actions. +Also adds a tray icon for configuration and management. + Example commands: - Capture with GUI: @@ -214,8 +217,6 @@ Steps for using the configuration: - Press Enter or Ctrl + C when you are in a capture mode and you don't have an active selection and the whole desktop will be copied to your clipboard! Pressing Ctrl + S will save your capture in a file! Check the [Shortcuts](#shortcuts) for more information. -- Execute the command `flameshot` without parameters to launch a running instance of the program without taking actions. - ## Installation There are packages available for a few distros: diff --git a/src/cli/commandlineparser.cpp b/src/cli/commandlineparser.cpp index 7b896aa5..ca641a52 100644 --- a/src/cli/commandlineparser.cpp +++ b/src/cli/commandlineparser.cpp @@ -340,6 +340,7 @@ CommandLineParser::printHelp(QStringList args, const Node* node) { args.removeLast(); // remove the help, it's always the last QString helpText; + // add usage info QString argName = node->argument.name(); if (argName.isEmpty()) { @@ -350,6 +351,10 @@ CommandLineParser::printHelp(QStringList args, const Node* node) .arg(args.join(QStringLiteral(" "))) .arg(argName) .arg(argText); + + // short section about default behavior + helpText += QStringLiteral("Per default runs Flameshot in the background and adds a tray icon for configuration.\n\n"); + // add command options and subarguments QList subArgs; for (const Node& n : node->subNodes)