Support dynamic footer-label actions and export footer-label as an environment variable
- Dominant language
- Go
- Stars
- 83k
- Forks
- 2.9k
- Avg merge
- 17h 8m
- Merged PRs (30d)
- 10
Description
### Checklist
- [x] I have read through the manual page (`man fzf`)
- [x] I have searched through the existing issues
- [ ] For bug reports, I have checked if the bug is reproducible in the latest version of fzf
### Output of `fzf --version`
0.72.0 (6fefe025)
### OS
- [x] Linux
- [ ] macOS
- [ ] Windows
- [ ] Etc.
### Shell
- [x] bash
- [ ] zsh
- [ ] fish
### Problem / Steps to reproduce
Currently, `fzf` supports dynamic label updates using change and transform actions. However, the **footer-label** lacks this flexibility. There is currently no way to dynamically update the footer label after the initial launch, nor is its value exported to child processes.
### Proposed solution
I propose making footer-label consistent with other labels by implementing the following:
1. **New actions:**
- **change-footer-label(...)** (change **--footer-label** to the given string)
- **transform-footer-label(...)** (transform footer label using an external command)
2. **Exported environment variable:**
- **FZF_FOOTER_LABEL**: Footer label string
This would allow for more consistent UI logic when building custom tools, where scripts might need to know what is currently being displayed in the footer. It would also eliminate the need to restart `fzf` to reflect changes in the footer label.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the existing change and transform action handling and the current footer-label implementation. Add dynamic change-footer-label and transform-footer-label actions plus the FZF_FOOTER_LABEL export, then verify that the footer updates after launch and child processes receive its current value.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- bash, go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100