Skip to content

Commit

Permalink
feat(actions): postfix option for reload|exec_silent (#917)
Browse files Browse the repository at this point in the history
  • Loading branch information
ibhagwan committed Oct 24, 2023
1 parent 04e7382 commit 6589bdd
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lua/fzf-lua/core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -886,11 +886,12 @@ M.convert_reload_actions = function(reload_cmd, opts)
v.fn(items, opts)
end, v.field_index == false and "" or v.field_index or "{+}", opts.debug)
opts.keymap.fzf[k] = {
string.format("%s%sexecute-silent(%s)+reload(%s)",
string.format("%s%sexecute-silent(%s)+reload(%s)%s",
type(v.prefix) == "string" and v.prefix or "",
unbind and (unbind .. "+") or "",
shell_action,
reload_cmd),
reload_cmd,
type(v.postfix) == "string" and v.postfix or ""),
desc = config.get_action_helpstr(v.fn)
}
opts.actions[k] = nil
Expand All @@ -915,9 +916,10 @@ M.convert_exec_silent_actions = function(opts)
v.fn(items, opts)
end, v.field_index == false and "" or v.field_index or "{+}", opts.debug)
opts.keymap.fzf[k] = {
string.format("%sexecute-silent(%s)",
string.format("%sexecute-silent(%s)%s",
type(v.prefix) == "string" and v.prefix or "",
shell_action),
shell_action,
type(v.postfix) == "string" and v.postfix or ""),
desc = config.get_action_helpstr(v.fn)
}
opts.actions[k] = nil
Expand Down

0 comments on commit 6589bdd

Please sign in to comment.