agterm-win 0.45.5 · cookbook
FZF path picker
Pick a file or folder with fzf in an overlay, and the path is typed into the shell's prompt as an argument to what you were writing.
In agterm-win
An agterm-server session in an Ubuntu distribution, in a fresh agterm-win with the Nordic Blue Dark theme.
sqlite3 -box half typed, the overlay searches the project's files.
Set it up in WSL
In the distribution, from a copy of the recipe's folder.
$ sudo apt install zsh fzf fd-find
$ mkdir -p ~/bin $ cp fzf-insert.zsh ~/bin/ $ chmod +x ~/bin/fzf-insert.zsh $ ln -s "$(command -v fdfind)" ~/bin/fd $ echo 'export AGT_FZF_ROOTS=$HOME/src' >> ~/.zshenv
Then, from a shell in an agterm session:
$ agtermctl session overlay open "zsh -lc '$HOME/bin/fzf-insert.zsh files <session-id>'" \
--size-percent 80 --target <session-id>
On Windows
- Ubuntu installs fd as
fdfind. Link it asfd, as above. - agterm-win doesn't run keymap commands yet, so the overlay is opened with
agtermctlfrom outside the session whose prompt you're typing in. The shots do the same.
The recipe, with how it works and its limits: cookbook/fzf-path-picker.