summaryrefslogtreecommitdiff
path: root/.local/bin
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-12-19 13:01:03 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-12-19 13:01:03 +0100
commit1b50c5498c5e7502e89fb86c282956c91eb42c46 (patch)
treeec419d5752a4ce83d8741aba9fa07dc64645e906 /.local/bin
parentb3b5a1ef2592c8731258ccc07ea04f5c5bf9d66c (diff)
uni: Make use of Andy’s new async builtin
Diffstat (limited to '.local/bin')
-rwxr-xr-x.local/bin/uni10
1 files changed, 6 insertions, 4 deletions
diff --git a/.local/bin/uni b/.local/bin/uni
index 34f2711..66b9950 100755
--- a/.local/bin/uni
+++ b/.local/bin/uni
@@ -19,11 +19,13 @@ func setup {
set DATA $(XDG_DATA_HOME:$HOME/.local/share)/unicode-data
test -f $DATA || setup
-set i `{
- tee >{cut -d';' -f1 | read -d\n runes} <$DATA
- | cut -d';' -f2
- | osel -i
+func read_runes {
+ cut -d';' -f1 $DATA | read -gd\n runes
}
+
+async read_runes
+set i `cut -d';' -f2 $DATA | osel -i
+wait
set rune `printf $runes[$i]
if test -t 2 {