summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Allen <screwtape@froup.com>2021-12-13 09:05:22 +1100
committerTim Allen <screwtape@froup.com>2021-12-13 09:05:22 +1100
commit19e4d58467c2226d61377c4088c2d23dc9cbc894 (patch)
tree1db7937546dca3fa45833c9031d2974ba9fba455
parent716f1f967a2d2fc22390b05d23c62c444f68ebff (diff)
Describe 'filter mode' in more detail.
Even though the synopsis mentioned `kak -f` accepts filenames, it wasn't clear to me that Kakoune would filter them in-place by default (I guess I assumed it would write them to stdout like sed(1)).
-rw-r--r--doc/kak.122
1 files changed, 18 insertions, 4 deletions
diff --git a/doc/kak.1 b/doc/kak.1
index be8b6ad7..37fab36b 100644
--- a/doc/kak.1
+++ b/doc/kak.1
@@ -96,10 +96,24 @@ Execute
after the server initialization phase.
.
.It Fl f Ar keys
-Enter in
-.Sq filter mode :
-select the whole file, then execute
-.Ar keys .
+Run Kakoune in
+.Sq filter mode ,
+like
+.Xr sed 1 .
+For standard input and each file named on the command line,
+the whole buffer is selected
+(as with
+.Li % )
+then
+.Ar keys
+are executed.
+The filtered version of standard input
+is written to standard output.
+Any files mentioned on the command line
+are modified in-place,
+but if
+.Fl i
+is provided then Kakoune makes a backup of the original version.
.
.It Fl i Ar suffix
Backup the files on which a filter is applied, using the given suffix.