Quellcode durchsuchen

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 vor 4 Jahren
Ursprung
Commit
58411446b7
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden GPG-Schlüssel-ID: 4AEE18F83AFDEB23
1 geänderte Dateien mit 3 neuen und 1 gelöschten Zeilen
  1. +3
    -1
      plugins/preview-kitty

+ 3
- 1
plugins/preview-kitty Datei anzeigen

@@ -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
Laden…
Abbrechen
Speichern