浏览代码

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
master
lvgx GitHub 4 年前
父节点
当前提交
58411446b7
找不到此签名对应的密钥 GPG 密钥 ID: 4AEE18F83AFDEB23
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. +3
    -1
      plugins/preview-kitty

+ 3
- 1
plugins/preview-kitty 查看文件

@@ -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


||||||
x
 
000:0
正在加载...
取消
保存