From db7321af115a79b63267cb18889cbd334e8ca6e2 Mon Sep 17 00:00:00 2001 From: Thomas Voss Date: Wed, 6 Dec 2023 20:58:18 +0100 Subject: scripts: Move many a script from sh to andy --- .local/bin/uni | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to '.local/bin/uni') diff --git a/.local/bin/uni b/.local/bin/uni index a45b4c5..a882c8c 100755 --- a/.local/bin/uni +++ b/.local/bin/uni @@ -1,11 +1,11 @@ #!/usr/local/bin/andy -set -e NOTIFY_LONG unicode -set -e NOTIFY_SHORT uni +set -e NOTIFY_LONG unicode +set -e NOTIFY_SHORT `basename $args[0] func setup { curl 'https://www.unicode.org/Public/UNIDATA/UnicodeData.txt' - | sed -E r#' + | sed -E ' s/;[^;]*//2g s/\<(.)([A-Z]*)/\1\L\2/2g /^[^;]*;$DATA + ' >$DATA } -test $#XDG_DATA_HOME -gt 0 || set XDG_DATA_HOME $HOME/.local/share -set DATA $XDG_DATA_HOME/unicode-data +set DATA $(XDG_DATA_HOME:$HOME/.local/share)/unicode-data test -f $DATA || setup set i `{ @@ -33,5 +32,3 @@ if test -t 2 { } else { wtype -- $rune } - -# vi: ft=sh -- cgit v1.2.3