summaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
Diffstat (limited to 'editors')
-rw-r--r--editors/awk.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/editors/awk.c b/editors/awk.c
index e765d3f..6c60a06 100644
--- a/editors/awk.c
+++ b/editors/awk.c
@@ -3156,7 +3156,8 @@ static var *evaluate(node *op, var *res)
if (op1) {
rsm = newfile(L.s);
if (!rsm->F) {
- if (opinfo == TI_PGETLINE) {
+ /* NB: can't use "opinfo == TI_PGETLINE", would break "cmd" | getline */
+ if ((opinfo & OPCLSMASK) == OC_PGETLINE) {
rsm->F = popen(L.s, "r");
rsm->is_pipe = TRUE;
} else {