~emersion/dotfiles

dotfiles/bin/menu -rwxr-xr-x 289 bytes
ef4245d4Simon Ser menu: remove unnecessary cat a month ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh -eu

in_pipe="$XDG_RUNTIME_DIR/menu-in.$$.pipe"
out_pipe="$XDG_RUNTIME_DIR/menu-out.$$.pipe"

mkfifo "$in_pipe" "$out_pipe"
trap "rm -f \"$in_pipe\" \"$out_pipe\"" EXIT

"$TERMINAL" --name menu -e "sh -x -c 'fzf <\"$in_pipe\" >\"$out_pipe\"'" &

cat >"$in_pipe"
cat <"$out_pipe"