[graphics/spectacle] /: Inconsistency between man page and actual available command line options

Nate Graham null at kde.org
Mon Dec 13 23:28:00 GMT 2021


Git commit 8630dbcc173cdb96b2a6ba02bedb75880db73a92 by Nate Graham, on behalf of Antonio Prcela.
Committed on 13/12/2021 at 23:26.
Pushed by ngraham into branch 'master'.

Inconsistency between man page and actual available command line options

Man page mentions `--clipboard` but in `SpectacleCore.cpp` it actually expects `--copy-image`.
Also, `--copy-path` is not mentioned at all in the man page.
Change man page to reflect codee and add `--copy-path` to man page.

BUG: 446710

M  +8    -1    doc/man-spectacle.1.docbook
M  +1    -1    src/SpectacleCore.cpp

https://invent.kde.org/graphics/spectacle/commit/8630dbcc173cdb96b2a6ba02bedb75880db73a92

diff --git a/doc/man-spectacle.1.docbook b/doc/man-spectacle.1.docbook
index b390b96..f795cda 100644
--- a/doc/man-spectacle.1.docbook
+++ b/doc/man-spectacle.1.docbook
@@ -132,12 +132,19 @@
 </varlistentry>
 
 <varlistentry>
-<term><option>-c, --clipboard</option></term>
+<term><option>-c, --copy-image</option></term>
 <listitem>
 <para>In background mode, copy screenshot to clipboard.</para>
 </listitem>
 </varlistentry>
 
+<varlistentry>
+<term><option>-C, --copy-path</option></term>
+<listitem>
+<para>In background mode, copy screenshot file path to clipboard.</para>
+</listitem>
+</varlistentry>
+
 <varlistentry>
 <term><option>-w, --onclick</option></term>
 <listitem>
diff --git a/src/SpectacleCore.cpp b/src/SpectacleCore.cpp
index 660636c..deca360 100644
--- a/src/SpectacleCore.cpp
+++ b/src/SpectacleCore.cpp
@@ -543,7 +543,7 @@ void SpectacleCore::populateCommandLineParser(QCommandLineParser *lCmdLineParser
         {{QStringLiteral("i"), QStringLiteral("new-instance")}, i18n("Starts a new GUI instance of spectacle without registering to DBus")},
         {{QStringLiteral("p"), QStringLiteral("pointer")}, i18n("In background mode, include pointer in the screenshot")},
         {{QStringLiteral("e"), QStringLiteral("no-decoration")}, i18n("In background mode, exclude decorations in the screenshot")},
-        {{QStringLiteral("E"),QStringLiteral("edit-existing")},      i18n("Open and edit existing screenshot file"), QStringLiteral("existingFileName")},
+        {{QStringLiteral("E"), QStringLiteral("edit-existing")}, i18n("Open and edit existing screenshot file"), QStringLiteral("existingFileName")},
     });
 }
 


More information about the kde-doc-english mailing list