From: Oleg Broytman Date: Fri, 29 May 2020 23:42:35 +0000 (+0300) Subject: webstdin: Redirect stdin from `/dev/tty` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=2339f34398738b0343c7cd552669362689f9ed25;p=dotfiles.git webstdin: Redirect stdin from `/dev/tty` The script is usually run with stdin redirected from a file or a pipe. It's necessary to re-redirect stdin so that a console browser reads from the terminal. --- diff --git a/bin/webstdin b/bin/webstdin index 395456c..209cecf 100755 --- a/bin/webstdin +++ b/bin/webstdin @@ -13,4 +13,4 @@ done shift `expr $OPTIND - 1` tmpfile="`mktemp -t XXXXXX.$ext`" && cat - >"$tmpfile" && -webbrowser $new_win file://"$tmpfile" && (sleep 10 && exec rm "$tmpfile" &) +webbrowser $new_win file://"$tmpfile"