Closed tcftbl closed 3 months ago
The open
command was intentionally designed to open both files and directories for convenience. If you prefer to have separate commands, you can define them in your config file:
cmd downdir &{{
if [ -d "$f" ]; then
lf -remote "send $id open"
fi
}}
cmd openfile &{{
if ! [ -d "$f" ]; then
lf -remote "send $id open"
fi
}}
map l downdir
map <enter> openfile
Thank you for the response!
Currently the command
open
changes to a directory if current file is a directory and opens the file otherwise. I was wondering if it might be a good idea to have separatedowndir
andopen
commands for navigating and opening files respectively.I find myself frequently opening files by accident when navigating the filesystem which can be a bit annoying. I think it could make navigating much faster if you wouldn't have to worry about accidentally opening files with
l
key and using, for exampleEnter
to open files.This might be a bit tricky to make work without breaking the current behaviour though.
What do you think?