nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 144682ad49ea9c95fa935abb14a86de41fb8a95e
parent 00f18570995c2518b51416b64763611baa9a81e8
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Sat, 23 Mar 2019 07:44:34 +0530

Add user script to view files in hex

Diffstat:
Muser-scripts/README.md | 1+
Auser-scripts/hexview | 11+++++++++++
2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/user-scripts/README.md b/user-scripts/README.md @@ -5,6 +5,7 @@ | copier | Copy selection to clipboard | | edit | Fuzzy find a file in directory subtree with fzy and edit in vim | | fzy | Fuzzy find a file in directory subtree with fzy and open using xdg-open | +| hexview | view a file in hex; needs xxd and $PAGER | | imgur | Upload an image file to imgur | | kdeconnect | Send selected files to Android device using kdeconnect-cli | | ndiff | File and directory diff for selection using vimdiff | diff --git a/user-scripts/hexview b/user-scripts/hexview @@ -0,0 +1,11 @@ +#!/usr/bin/env sh + +# Description: View a file in hex +# Requires: xxd and $PAGER +# +# Shell: POSIX compliant +# Author: Arun Prakash Jana + +if ! [ -z "$1" ]; then + xxd "$1" | "$PAGER" +fi