Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve less an image #106

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions lesspipe.sh
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,14 @@ isfinal () {
# not a specific file format
if [[ -z ${cmd[*]} ]]; then
fext=$(fileext "$1")
# video has many frames which cost too many time to show, so only for image
if [[ $fcat == image ]]; then
{ has_cmd chafa && chafa -f symbols "$1"; } ||
{ has_cmd catimg && catimg "$1"; } ||
{ has_cmd tiv && tiv "$1"; } ||
{ has_cmd plotext && plotext image -p symbols "$1"; }
{ has_cmd imaging && imaging "$1"; }
fi
if [[ $fcat == audio || $fcat == video || $fcat == image ]]; then
{ has_cmd mediainfo && cmd=(mediainfo --Full "$1"); } ||
{ has_cmd exiftool && cmd=(exiftool "$1"); } ||
Expand Down