m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 00:03:39 -05:00

[fzf-tmux] Exit with the same exit status as with fzf

This commit is contained in:
Junegunn Choi
2015-09-18 10:26:04 +09:00
parent ca19762e58
commit 9398878048

View File

@@ -102,7 +102,7 @@ trap cleanup EXIT SIGINT SIGTERM
fail() { fail() {
>&2 echo "$1" >&2 echo "$1"
exit 1 exit 2
} }
fzf="$(which fzf 2> /dev/null)" || fzf="$(dirname "$0")/fzf" fzf="$(which fzf 2> /dev/null)" || fzf="$(dirname "$0")/fzf"
[ -x "$fzf" ] || fail "fzf executable not found" [ -x "$fzf" ] || fail "fzf executable not found"
@@ -134,5 +134,5 @@ else
cat <&0 > $fifo1 & cat <&0 > $fifo1 &
fi fi
cat $fifo2 cat $fifo2
[ "$(cat $fifo3)" = '0' ] exit "$(cat $fifo3)"