add wrapper script

This commit is contained in:
2026-02-03 12:29:01 -07:00
parent 0eef816117
commit 7b4c6bff1b
2 changed files with 25 additions and 3 deletions

15
wrapper.sh Executable file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
# Make a buffered FIFO queue
mkfifo /tmp/fifo 2> /dev/null
exec 4<> /tmp/fifo
# Put the output to fd 4 and put the TUI to 2, since pipes redirect 1 by default
cat /dev/stdin | ./target/release/select_option /proc/self/fd/4 1>&2
read -r VAL < /proc/self/fd/4
echo $VAL
rm /tmp/fifo