Skip to content

Commit

Permalink
Rename 'deny' to 'exclude'
Browse files Browse the repository at this point in the history
  • Loading branch information
junegunn committed Feb 9, 2025
1 parent 39f4d93 commit 3d22e41
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion man/man1/fzf.1
Original file line number Diff line number Diff line change
Expand Up @@ -1595,13 +1595,13 @@ A key or an event can be bound to one or more of the following actions.
\fBclear\-query\fR (clear query string)
\fBdelete\-char\fR \fIdel\fR
\fBdelete\-char/eof\fR \fIctrl\-d\fR (same as \fBdelete\-char\fR except aborts fzf if query is empty)
\fBdeny\fR (exclude the current item or the selected items from the result)
\fBdeselect\fR
\fBdeselect\-all\fR (deselect all matches)
\fBdisable\-search\fR (disable search functionality)
\fBdown\fR \fIctrl\-j ctrl\-n down\fR
\fBenable\-search\fR (enable search functionality)
\fBend\-of\-line\fR \fIctrl\-e end\fR
\fBexclude\fR (exclude the current item or the selected items from the result)
\fBexecute(...)\fR (see below for the details)
\fBexecute\-silent(...)\fR (see below for the details)
\fBfirst\fR (move to the first match; same as \fBpos(1)\fR)
Expand Down
4 changes: 2 additions & 2 deletions src/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -1603,8 +1603,8 @@ func parseActionList(masked string, original string, prevActions []*action, putA
}
case "bell":
appendAction(actBell)
case "deny":
appendAction(actDeny)
case "exclude":
appendAction(actExclude)
default:
t := isExecuteAction(specLower)
if t == actIgnore {
Expand Down
4 changes: 2 additions & 2 deletions src/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -584,7 +584,7 @@ const (
actShowHeader
actHideHeader
actBell
actDeny
actExclude
)

func (a actionType) Name() string {
Expand Down Expand Up @@ -4911,7 +4911,7 @@ func (t *Terminal) Loop() error {
}
case actBell:
t.tui.Bell()
case actDeny:
case actExclude:
if len(t.selected) > 0 {
for _, item := range t.sortSelected() {
denylist = append(denylist, item.item.Index())
Expand Down
6 changes: 3 additions & 3 deletions test/test_core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1666,8 +1666,8 @@ def test_abort_action_chain
end
end

def test_deny
tmux.send_keys %(seq 1000 | #{FZF} --multi --bind 'a:deny,b:reload(seq 1000),c:reload-sync(seq 1000)'), :Enter
def test_exclude
tmux.send_keys %(seq 1000 | #{FZF} --multi --bind 'a:exclude,b:reload(seq 1000),c:reload-sync(seq 1000)'), :Enter

tmux.until { |lines| assert_equal 1000, lines.match_count }
tmux.until { |lines| assert_includes lines, '> 1' }
Expand All @@ -1687,7 +1687,7 @@ def test_deny
tmux.until { |lines| assert_equal 1000, lines.match_count }
tmux.until { |lines| assert_includes lines, '> 2' }

# TODO: We should also check the behavior of 'deny' during reloads
# TODO: We should also check the behavior of 'exclude' during reloads
end

def test_accept_nth
Expand Down

0 comments on commit 3d22e41

Please sign in to comment.