change to more stable options
This commit is contained in:
13
wrapper.sh
13
wrapper.sh
@@ -1,15 +1,10 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Make a buffered FIFO queue
|
TMP=$(mktemp)
|
||||||
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
|
# 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
|
cat /dev/stdin | ./target/release/select_option $TMP 1>&2
|
||||||
|
|
||||||
read -r VAL < /proc/self/fd/4
|
cat $TMP
|
||||||
|
rm $TMP
|
||||||
echo $VAL
|
|
||||||
|
|
||||||
rm /tmp/fifo
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user