Jump to first file #1398
-
I was wondering if there was a builtin way of jumping to the first file in a directory filled with both files and directories? Thanks in advance :) |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
There's no builtin command for this kind of movement, but assuming you have directories sorted above files this is a hacky solution:
Another alternative that is more flexible is to use the shell to determine the first file, and then call map gf %{{
# replace this with any other method of getting a file
file=$(ls -F | grep -v '[*/=>@|]$' | head -n 1)
if [ -f "$file" ]; then
lf -remote "send $id select \"$file\""
fi
}} |
Beta Was this translation helpful? Give feedback.
-
Thank @joelim-work. This is a good alternative |
Beta Was this translation helpful? Give feedback.
There's no builtin command for this kind of movement, but assuming you have directories sorted above files this is a hacky solution:
Another alternative that is more flexible is to use the shell to determine the first file, and then call
lf -remote
toselect
it: