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

Add $FZF_RAW for conditional actions

This commit is contained in:
Junegunn Choi
2025-09-29 22:36:44 +09:00
parent 0eefcf348e
commit 8f0c91545d
4 changed files with 35 additions and 1 deletions

View File

@@ -1305,6 +1305,13 @@ func (t *Terminal) environImpl(forPreview bool) []string {
if len(t.nthCurrent) > 0 {
env = append(env, "FZF_NTH="+RangesToString(t.nthCurrent))
}
if t.raw {
val := "0"
if t.isCurrentItemMatch() {
val = "1"
}
env = append(env, "FZF_RAW="+val)
}
inputState := "enabled"
if t.inputless {
inputState = "hidden"