Skip to content

Commit 34d15c3

Browse files
committed
feat(actions): added postfix option to reload|exec_silent
1 parent 04e7382 commit 34d15c3

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

lua/fzf-lua/core.lua

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -886,11 +886,12 @@ M.convert_reload_actions = function(reload_cmd, opts)
886886
v.fn(items, opts)
887887
end, v.field_index == false and "" or v.field_index or "{+}", opts.debug)
888888
opts.keymap.fzf[k] = {
889-
string.format("%s%sexecute-silent(%s)+reload(%s)",
889+
string.format("%s%sexecute-silent(%s)+reload(%s)%s",
890890
type(v.prefix) == "string" and v.prefix or "",
891891
unbind and (unbind .. "+") or "",
892892
shell_action,
893-
reload_cmd),
893+
reload_cmd,
894+
type(v.postfix) == "string" and v.postfix or ""),
894895
desc = config.get_action_helpstr(v.fn)
895896
}
896897
opts.actions[k] = nil
@@ -915,9 +916,10 @@ M.convert_exec_silent_actions = function(opts)
915916
v.fn(items, opts)
916917
end, v.field_index == false and "" or v.field_index or "{+}", opts.debug)
917918
opts.keymap.fzf[k] = {
918-
string.format("%sexecute-silent(%s)",
919+
string.format("%sexecute-silent(%s)%s",
919920
type(v.prefix) == "string" and v.prefix or "",
920-
shell_action),
921+
shell_action,
922+
type(v.postfix) == "string" and v.postfix or ""),
921923
desc = config.get_action_helpstr(v.fn)
922924
}
923925
opts.actions[k] = nil

0 commit comments

Comments
 (0)