-
Notifications
You must be signed in to change notification settings - Fork 1
FAQ
Both flags turn lf into a file picker:
- Select the files you want.
- Confirm the selection by opening any file.
lf then exits and returns the selected paths. -print-selection prints them to stdout, -selection-path <path> writes them to the given file.
If you quit lf without confirming, the selection is discarded.
For security reasons, regular programs like lf can't change your shell's working directory.
A common workaround is printing or writing the last directory on exit and letting the shell cd into it. lf exposes the flags -print-last-dir and -last-dir-path for this purpose.
You can use one of the example lfcd wrapper shell scripts provided here:
https://github.com/gokcehan/lf/tree/master/etc
Make sure the following things are true:
- You put
set iconsinto yourlfrc. - You are using a nerd font and your terminal supports it (not needed when using emojis or 'normal' characters)
Tip: When using custom icons, make sure to put slashes (/) after directory names (even on Windows).