diff options
| author | 2019-06-01 00:59:59 +0530 | |
|---|---|---|
| committer | 2019-06-02 21:37:42 +0530 | |
| commit | 650f92bf346d9183da47f79e33ec331cb0150386 (patch) | |
| tree | 3db1682c9a9186152bde9a5e797b787366917fad /plugins/viuimg | |
| parent | 9ba3cb3e9b426b72b14e6c616fdb35828e4b9f7c (diff) | |
| download | nnn-650f92bf346d9183da47f79e33ec331cb0150386.tar.gz | |
Add plugin to view image and browse image dir
Diffstat (limited to 'plugins/viuimg')
| -rwxr-xr-x | plugins/viuimg | 14 |
1 files changed, 14 insertions, 0 deletions
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 |