Skip FZF_CURRENT_ITEM export for items larger than 64 KB

A huge item can overflow ARG_MAX and break exec with E2BIG, failing
preview and other child commands. (#4806)
This commit is contained in:
Junegunn Choi committed 2026-06-23 20:50:12 +09:00
1 parent 109057877b
commit f2e451596c
4 files changed
+32 -2

No files matched your search

+3
View File
@@ -1534,6 +1534,9 @@ fzf exports the following environment variables to its child processes.
.PP
.B FZF_CURRENT_ITEM
is omitted when the item contains a NUL byte, because exec(2) cannot pass it.
It is also omitted when the item is larger than 64 KB, so that a huge item
cannot overflow the environment size limit and break preview and other child
commands.
.SH EXTENDED SEARCH MODE