diff options
-rwxr-xr-x | .local/bin/uni | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/.local/bin/uni b/.local/bin/uni index 73c6e1c..9a8d636 100755 --- a/.local/bin/uni +++ b/.local/bin/uni @@ -8,13 +8,14 @@ export NOTIFY_SHORT="${0##*/}" setup() { curl 'https://www.unicode.org/Public/UNIDATA/UnicodeData.txt' \ - | >"$DATA" sed -E \ - -e 's/;[^;]*//2g' \ - -e 's/\<(.)([A-Z]*)/\1\L\2/2g' \ - -e '/^[^;]*;</d' \ - -e '/Compatibility/d' \ - -e '/Variation Selector/d' \ - -e 's/[^;]*/\\\\u&/' + | sed -E ' + s/;[^;]*//2g + s/\<(.)([A-Z]*)/\1\L\2/2g + /^[^;]*;</d + /Compatibility/d + /Variation Selector/d + s/[^;]*/\\\\u&/ + ' >"$DATA" } readonly DATA="${XDG_DATA_HOME:-$HOME/.local/share}/unicode-data" |