Add more built-in previews

This commit is contained in:
Nikita Ivanov 2022-06-12 22:27:24 +05:00
parent fe0bc5c650
commit 39311ccb0c
No known key found for this signature in database
GPG Key ID: 6E656AC5B97B5133
9 changed files with 21 additions and 0 deletions

1
prev/colordiff.sh Normal file
View File

@ -0,0 +1 @@
colordiff < "$f"

1
prev/delta.sh Normal file
View File

@ -0,0 +1 @@
delta < "$f"

1
prev/diff_so_fancy.sh Normal file
View File

@ -0,0 +1 @@
diff-so-fancy < "$f"

1
prev/elinks.sh Normal file
View File

@ -0,0 +1 @@
elinks -dump "$f"

1
prev/ls.sh Normal file
View File

@ -0,0 +1 @@
ls --color --group-directories-first "$f"

1
prev/lynx.sh Normal file
View File

@ -0,0 +1 @@
lynx -dump -- "$f"

1
prev/torrent.sh Normal file
View File

@ -0,0 +1 @@
transmission-show -- "$f"

1
prev/w3m.sh Normal file
View File

@ -0,0 +1 @@
w3m -dump "$f"

View File

@ -18,6 +18,7 @@ Preview b_previews[] = {
PR(NULL, NULL, NULL, any),
PR("md", NULL, NULL, mdcat),
PR("torrent", NULL, NULL, torrent),
PR(NULL, "text", NULL, bat),
PR(NULL, "text", NULL, highlight),
@ -29,6 +30,18 @@ Preview b_previews[] = {
PR(NULL, "application", "pdf", pdf),
PR(NULL, "application", "json", jq),
PR(NULL, "inode", "directory", ls),
PR(NULL, "text", "html", w3m),
PR(NULL, "text", "html", lynx),
PR(NULL, "text", "html", elinks),
PR(NULL, "text", "x-diff", delta),
PR(NULL, "text", "x-patch", delta),
PR(NULL, "text", "x-diff", diff_so_fancy),
PR(NULL, "text", "x-patch", diff_so_fancy),
PR(NULL, "text", "x-diff", colordiff),
PR(NULL, "text", "x-patch", colordiff),
};