Add previewer to lf
This commit is contained in:
@ -1,2 +1,5 @@
|
|||||||
set hidden true
|
set hidden true
|
||||||
set icons true
|
set icons true
|
||||||
|
|
||||||
|
set previewer ~/.config/lf/pv.sh
|
||||||
|
map i $~/.config/lf/pv.sh $f | less -R
|
||||||
|
11
lf/.config/lf/pv.sh
Executable file
11
lf/.config/lf/pv.sh
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
*.tar*) tar tf "$1";;
|
||||||
|
*.zip) unzip -l "$1";;
|
||||||
|
*.rar) unrar l "$1";;
|
||||||
|
*.7z) 7z l "$1";;
|
||||||
|
*.pdf) pdftotext "$1" -;;
|
||||||
|
*) highlight -O ansi "$1";;
|
||||||
|
#*) bat -P "$1";;
|
||||||
|
esac
|
Reference in New Issue
Block a user