Export FZF_CURRENT_ITEM to child processes (#4803)

Close #4802
This commit is contained in:
Junegunn Choi
2026-05-23 22:28:03 +09:00
committed by GitHub
parent 677e854850
commit de1fca99d5
4 changed files with 9 additions and 2 deletions
+3
View File
@@ -1438,6 +1438,9 @@ func (t *Terminal) environImpl(forPreview bool) []string {
env = append(env, fmt.Sprintf("FZF_LINES=%d", t.areaLines))
env = append(env, fmt.Sprintf("FZF_COLUMNS=%d", t.areaColumns))
env = append(env, fmt.Sprintf("FZF_POS=%d", min(t.merger.Length(), t.cy+1)))
if item := t.currentItem(); item != nil {
env = append(env, "FZF_CURRENT_ITEM="+item.AsString(t.ansi))
}
env = append(env, fmt.Sprintf("FZF_CLICK_HEADER_LINE=%d", t.clickHeaderLine))
env = append(env, fmt.Sprintf("FZF_CLICK_HEADER_COLUMN=%d", t.clickHeaderColumn))
env = append(env, fmt.Sprintf("FZF_CLICK_FOOTER_LINE=%d", t.clickFooterLine))