summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorw0rp <devw0rp@gmail.com>2020-08-24 09:33:07 +0100
committerw0rp <devw0rp@gmail.com>2020-08-24 09:33:07 +0100
commit3e2abe3f25493af63af91a6013447e378e09f6ec (patch)
treedceeaf74a9795138dff8335b6b1758b7420e57e2 /doc
parent1a7366067af97cda00268d52de5a873827c52962 (diff)
downloadale-3e2abe3f25493af63af91a6013447e378e09f6ec.zip
#2556 - Support modifiers for formatted filenames
Diffstat (limited to 'doc')
-rw-r--r--doc/ale.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/doc/ale.txt b/doc/ale.txt
index 7327959b..ac51e466 100644
--- a/doc/ale.txt
+++ b/doc/ale.txt
@@ -342,6 +342,8 @@ are supported for running the commands.
file will be created, containing the lines from the file
after previous adjustment have been done.
+ See |ale-command-format-strings| for formatting options.
+
`read_temporary_file` When set to `1`, ALE will read the contents of the
temporary file created for `%t`. This option can be used
for commands which need to modify some file on disk in
@@ -3739,6 +3741,16 @@ ale#linter#Define(filetype, linter) *ale#linter#Define()*
command, so literal character sequences `%s` and `%t` can be escaped by
using `%%s` and `%%t` instead, etc.
+ Some |filename-modifiers| can be applied to `%s` and `%t`. Only `:h`, `:t`,
+ `:r`, and `:e` may be applied, other modifiers will be ignored. Filename
+ modifiers can be applied to the format markers by placing them after them.
+
+ For example: >
+ 'command': '%s:h %s:e %s:h:t',
+<
+ Given a path `/foo/baz/bar.txt`, the above command string will generate
+ something akin to `'/foo/baz' 'txt' 'baz'`
+
If a callback for a command generates part of a command string which might
possibly contain `%%`, `%s`, `%t`, or `%e`, where the special formatting
behavior is not desired, the |ale#command#EscapeCommandPart()| function can