mirror of
https://github.com/jarun/nnn.git
synced 2024-11-24 11:51:27 +00:00
preview-kitty: fix crash on first file on dash (#636)
In the dash shell, when `exec < fifo` is interrupted by SIGCHLD, it exits. So we replace it with `cat fifo |`. Issue discussed in #614
This commit is contained in:
parent
65cf067dc4
commit
58411446b7
|
@ -63,7 +63,9 @@ if [ "$PREVIEW_MODE" ] ; then
|
|||
|
||||
preview_file "$1"
|
||||
|
||||
exec < "$NNN_FIFO"
|
||||
# use cat instead of 'exec <' to avoid issues with dash shell
|
||||
# shellcheck disable=SC2002
|
||||
cat "$NNN_FIFO" |\
|
||||
while read -r selection ; do
|
||||
preview_file "$selection"
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue