Though KWrite may most often be started from the Plasma™ application starter, or a desktop icon, it can also be opened at the command line prompt of a terminal window. There are a few useful options that are available when doing this.
Many other applications that use KatePart offer similar command line options.
By specifying the path and name of a particular file the user can have KWrite open (or create) that file immediately upon startup. This option might look something like the following:
%kwrite/home/myhome/docs/myfile.txt
The above-mentioned method could even be used to open files on the Internet (if the user has an active connection at the time.) An example of this might look like the following:
%kwriteftp://ftp.kde.org/pub/kde/README
The following command line help options are available
kwrite--helpThis lists the most basic options available at the command line.
kwrite--authorLists KWrite's authors in the terminal window.
kwrite-v,--versionLists version information for the application.
kwrite--licenseShows license information.
kwrite--desktopfilefilenameThe base file name of the desktop entry for this application.
This is in particular useful for wrapper applications and applications having in general multiple desktop files. Thus each desktop file can have its own command line for the
Execentry.kwrite-e,--encodingencodingCauses KWrite to use the specified encoding for the document.
kwrite-l,--linelineNavigate to the specified line after opening the document.
kwrite-c,--columncolumnNavigate to the specified column after opening the document.
kwrite-i,--stdinCauses KWrite to read the document content from STDIN. This is similar to the common option
-used in many command line programs, and allows you to pipe command output into KWrite.