summaryrefslogtreecommitdiff
path: root/gemfeed/examples/conf/dotfiles/scripts/hx.prompt
blob: 8dd14dd37078e2c122420b16c8452ef07428c831 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/usr/bin/env zsh

declare -r REPLY_FILE=~/.hx-prompt-reply
if [ -f "$REPLY_FILE" ]; then
  rm "$REPLY_FILE"
fi

tmux split-window -v "touch $REPLY_FILE.tmp; hx $REPLY_FILE.tmp; mv $REPLY_FILE.tmp $REPLY_FILE"

while [ ! -f "$REPLY_FILE" ]; do
  sleep 0.2
done

cat "$REPLY_FILE"