Skip to content

Commit 992bb7b

Browse files
committed
Improve flog#Format() documentation
1 parent 56d9a66 commit 992bb7b

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

doc/flog.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,11 +1106,10 @@ lua require("flog").format({command})
11061106

11071107
Example:
11081108
>
1109-
flog#Format('Git show %h')
1109+
:exec flog#Format('Floggit show %h')
1110+
:call flog#Exec(flog#Format('<mods> Gsplit %h'))
11101111
<
11111112

1112-
This can be used to format commands before passing them to |flog#Exec()|.
1113-
11141113
==============================================================================
11151114
AUTOCOMMANDS *flog-autocommands*
11161115

@@ -1196,15 +1195,16 @@ The commit jump history persists when the |:Flog| buffer updates.
11961195
------------------------------------------------------------------------------
11971196
COMMAND FORMAT *flog-command-format*
11981197

1199-
When running commands with |flog#Format()|, a special syntax similar to
1200-
|printf| is used to transform the command string.
1198+
When using |flog#Format()|, a special syntax similar to |printf| is used to
1199+
transform the string.
12011200

12021201
Items prefixed by the "%" character are resolved into commit information and
12031202
Flog options.
12041203

12051204
If any items cannot be resolved, such as if the |:Flog| buffer is empty or
1206-
the item uses an option like "-path" that was not set, commands will not be
1207-
run.
1205+
the item contains only an option like "-path" that was not set, returns an
1206+
empty string. This command will do nothing if called with |:exec| or
1207+
|flog#Exec()|.
12081208

12091209
The following items are supported:
12101210

0 commit comments

Comments
 (0)