From 650f92bf346d9183da47f79e33ec331cb0150386 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Sat, 1 Jun 2019 00:59:59 +0530 Subject: Add plugin to view image and browse image dir --- plugins/viuimg | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100755 plugins/viuimg (limited to 'plugins/viuimg') diff --git a/plugins/viuimg b/plugins/viuimg new file mode 100755 index 0000000..8505be8 --- /dev/null +++ b/plugins/viuimg @@ -0,0 +1,14 @@ +#!/usr/bin/env sh + +# Description: View an image or images in a directory in pager +# +# Shell: POSIX compliant +# Author: Arun Prakash Jana + +if ! [ -z "$1" ]; then + if [ -d "$1" ]; then + viu -n "$1"/* 2>/dev/null | less -R + else + viu -n "$1" | less -R + fi +fi -- cgit v1.3.1