Fix INPUT statuses being counted as redirects

This commit is contained in:
styan 2020-05-24 23:56:51 +00:00
parent a18262a60c
commit ca9120abb3
1 changed files with 3 additions and 2 deletions

View File

@ -115,15 +115,16 @@ geminawk() {
cmd | getline
sub(/\r$/, "")
if ($1 ~ /^1/) { # INPUT
prompt = "?"
prompt = ""
for (i = 2; i <= NF; i++)
prompt = prompt \
(i > 2 ? " " : "") $i
print prompt
print(i > 2 ? prompt : "?")
getline
sub(/\?.*/, "", u)
u = u "?" uriescape($0, \
"!$&'\''()*+,/:;=?@")
redir = -1;
} else if ($1 ~ /^2/) { # OK
while (cmd | getline)
print