m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-14 14:23:47 -05:00

Add bg-cancel action to ignore running background transforms

Close #4430

Example:

  # Implement popup that disappears after 1 second
  #   * Use footer as the popup
  #   * Use `bell` to ring the terminal bell
  #   * Use `bg-transform-footer` to clear the footer after 1 second
  #   * Use `bg-cancel` to ignore currently running background transform actions
  fzf --multi --list-border \
      --bind 'enter:execute-silent(echo -n {+} | pbcopy)+bell' \
      --bind 'enter:+transform-footer(echo Copied {} to clipboard)' \
      --bind 'enter:+bg-cancel+bg-transform-footer(sleep 1)'
This commit is contained in:
Junegunn Choi
2025-06-21 17:21:03 +09:00
parent c35d9cff7d
commit c36ddce36f
5 changed files with 96 additions and 49 deletions

View File

@@ -1703,6 +1703,8 @@ func parseActionList(masked string, original string, prevActions []*action, putA
appendAction(actExclude)
case "exclude-multi":
appendAction(actExcludeMulti)
case "bg-cancel":
appendAction(actBgCancel)
default:
t := isExecuteAction(specLower)
if t == actIgnore {