lf icon indicating copy to clipboard operation
lf copied to clipboard

Previewing directories like files

Open jryom opened this issue 4 years ago • 2 comments

I was trying to figure out a way to use tree to preview directories, but it seems that lf will only allow custom preview functionality for files (is this correct or did I miss something?).

It would be great to also have the option of using custom previewing for directories.

And thanks for making this great tool!

jryom avatar Sep 29 '21 08:09 jryom

@jryom previewer only works for text files and binary file previews have been requested before in #322 but I don't think we have a dedicated issue for directory previews so far. So let's keep this open in case someone wants to work on this.

gokcehan avatar Oct 09 '21 18:10 gokcehan

@gokcehan I'm trying to display help in the preview, the problem is when I'm on a directory I can't see the output. Currently using Yad dialog box as a work around. Tree would be nice as well. Not sure if there's a better approach?

cmd help %{{ 
    sed -n  -E -e "/^# $1$/,/^$/p" ~/.config/lf/lfrc| yad --text-info 
}}
map Ht help "Tags"

Preview

sed -n  -E -e "/^# $1$/,/^$/p" ~/.config/lf/lfrc
exit 1

Thanks

rickswe avatar Jul 24 '22 15:07 rickswe

This was fixed in #842, this issue wasn't linked properly in the PR.

joelim-work avatar Jul 05 '23 05:07 joelim-work