Skip FZF_CURRENT_ITEM export when item contains NUL

- exec(2) rejects env entries containing NUL, breaking preview and
  other child commands when the input has NUL bytes
- skip the export and document the limitation

Fix #2395
This commit is contained in:
Junegunn Choi
2026-05-25 14:06:50 +09:00
parent 3953d1c649
commit 4b23aa45a8
2 changed files with 8 additions and 1 deletions
+4
View File
@@ -1531,6 +1531,10 @@ fzf exports the following environment variables to its child processes.
.br
.BR FZF_RAW " Only in raw mode. 1 if the current item matches, 0 otherwise"
.PP
.B FZF_CURRENT_ITEM
is omitted when the item contains a NUL byte, because exec(2) cannot pass it.
.SH EXTENDED SEARCH MODE
Unless specified otherwise, fzf will start in "extended\-search mode". In this