Bug 117452 - All applications should read from stdin where applicable
Summary: All applications should read from stdin where applicable
Status: RESOLVED NOT A BUG
Alias: None
Product: kde
Classification: I don't know
Component: general (show other bugs)
Version: unspecified
Platform: OpenSUSE Linux
: NOR wishlist with 82 votes (vote)
Target Milestone: ---
Assignee: Stephan Kulow
URL:
Keywords:
Depends on: 111388 175649
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-01 19:36 UTC by Tristan Miller
Modified: 2020-10-01 17:58 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tristan Miller 2005-12-01 19:36:37 UTC
Version:            (using KDE KDE 3.5.0)
Installed from:    SuSE RPMs

This report concerns the KDE User Interface Guidelines <http://developer.kde.org/documentation/standards/kde/style/basics/index.html>.

For many decades now, most Unix programs which take an input file as a command-line argument will accept the special filename "-", which signals that the input is provided by stdin rather than a file.  This makes it very easy to pipe data among applications.  This is useful not just for command-line utilities in shell scripts, but also for GUI applications too.  For example, the popular antiword program takes an MS-Word document as input and converts it to PDF, which is output to stdout.  However, kpdf, the KDE PDF viewer, does not accept input from stdin, so the following quick viewing command does not work:

$ antiword -aa4 foo.doc | kpdf -

Instead, one has to muck about with temporary files.  What was formerly a quick one-liner becomes a multi-line shell script.  And besides which, the temporary file will appear in kpdf's "File->Open recent" menu, which we do not want.

Rather than file this bug separately for every KDE application (see Bug 117450, Bug 117449), I think KDE should adopt this as a KDE-wide interface standard and encourage developers to abide by it.  The standard could be phrased as follows:

A KDE application which accepts one or more filenames for reading as command-line arguments should also recognize the special identifier "-" in place of one of the filenames, which means that the input is to be provided by stdin rather than a file.  If the application maintains a list of recently opened files, then any files read from stdin should not appear in the list.
Comment 1 Raúl 2007-06-17 02:08:03 UTC
*** This bug has been confirmed by popular vote. ***
Comment 2 Raúl 2007-06-17 02:12:03 UTC
Will this topic be addressed on KDE4? I think is quite important and hasn't received any attention up to now.
Comment 3 Tristan Miller 2008-09-24 11:49:19 UTC
I think it may be necessary to report this bug on a per-application basis, making reference to this bug.  Perhaps this bug could be used as a tracking bug via the dependency feature?
Comment 4 Nate Graham 2020-09-29 04:41:10 UTC
> I think it may be necessary to report this bug on a per-application basis,
Indeed. Any bug report with text like "every application should..." is unlikely to be actionable. Not sure we need to keep this around as an umbrella bug anyway.
Comment 5 Tristan Miller 2020-09-30 07:16:37 UTC
Nate, I appreciate all the work you have been doing lately in pinging ancient bugs and closing the ones that are not or no longer valid, but I have to disagree with you in this case (and in the case of Bug 117454).  KDE isn't just a random collection of applications that behave entirely at the whim of their developers, but rather a project to create a unified, coherent desktop environment. This means (among other things) consistent user interface guidelines and interoperability among applications.

The present bug is as a request for our official development guidelines (formerly at <http://developer.kde.org/documentation/standards/kde/style/basics/index.html> but now at <https://techbase.kde.org/Development/Guidelines>) to codify a - command-line option as being standard interface behaviour (where appropriate) so that our developers are at least aware of the need for it.  Strictly speaking, the bug is "RESOLVED->FIXED" when KDE's developer documentation is updated, not when every KDE application in existence comes into compliance with it.

The idea of leaving this issue open as a tracking bug was a suggestion for coordinating UI updates among our various UI gurus and application developers.  That is, whenever a new issue is filed for a particular application to implement the - option, it can simply reference this one so that the reporter doesn't need to rehash all the information presented here, and conversely those following the tracking bug will become aware of the dependent ones and perhaps volunteer to help fix them.  Of course, doing things this way isn't strictly necessary, though in my experience it's a fairly common one in collaborative free software projects.
Comment 6 Nate Graham 2020-10-01 17:58:37 UTC
In general, we don't use Bugzilla for long-term task tracking anymore; instead we use Phabricator Tasks. If you'd like to start an effort like this, it's best to use Phabricator for it, and then we use Bugzilla to track the individual apps that need changes.