summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2023-02-28 09:58:54 +0100
committerUrbain Vaes <urbain@vaes.uk>2023-02-28 09:58:54 +0100
commit5a6ff970a9471d5b3127e681fe1755d4efdc0454 (patch)
tree0411d2523bdc62e27d8a05aa76ce9076ed73619e /bin
parentb307e61ea25d4b7dbb10136a427c74709a78c98a (diff)
Minor changes
Diffstat (limited to 'bin')
-rwxr-xr-xbin/.local/bin/ls-chars11
1 files changed, 11 insertions, 0 deletions
diff --git a/bin/.local/bin/ls-chars b/bin/.local/bin/ls-chars
new file mode 100755
index 0000000..ec05af2
--- /dev/null
+++ b/bin/.local/bin/ls-chars
@@ -0,0 +1,11 @@
+#!/bin/bash
+for range in $(fc-match --format='%{charset}\n' "$1"); do
+ for n in $(seq "0x${range%-*}" "0x${range#*-}"); do
+ printf "%04x\n" "$n"
+ done
+done | while read -r n_hex; do
+ count=$((count + 1))
+ printf "%-5s\U$n_hex\t" "$n_hex"
+ [ $((count % 10)) = 0 ] && printf "\n"
+done
+printf "\n"