aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/hexview
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/hexview')
-rwxr-xr-xplugins/hexview8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/hexview b/plugins/hexview
index 60b3428..ce17a60 100755
--- a/plugins/hexview
+++ b/plugins/hexview
@@ -1,11 +1,15 @@
#!/usr/bin/env sh
# Description: View a file in hex
-# Dependencies: xxd and $PAGER
+# Dependencies: hx (https://github.com/krpors/hx)/xxd and $PAGER
#
# Shell: POSIX compliant
# Author: Arun Prakash Jana
if ! [ -z "$1" ]; then
- xxd "$1" | $PAGER
+ if which hx >/dev/null 2>&1; then
+ hx "$1"
+ else
+ xxd "$1" | $PAGER
+ fi
fi