aboutsummaryrefslogtreecommitdiff
path: root/modules/ext/critical-ext-bundle.js
diff options
context:
space:
mode:
Diffstat (limited to 'modules/ext/critical-ext-bundle.js')
-rw-r--r--modules/ext/critical-ext-bundle.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/modules/ext/critical-ext-bundle.js b/modules/ext/critical-ext-bundle.js
index fb623fd..f892617 100644
--- a/modules/ext/critical-ext-bundle.js
+++ b/modules/ext/critical-ext-bundle.js
@@ -594,7 +594,10 @@ class ShellModule {
// Commands that read from files and should use the pipe buffer file. wc is NOT here any
// more: it reads terminal._pipeInput natively (v4.6.111), and injecting __pipebuf__ gave
// `3 __pipebuf__` instead of a bare count.
- return ['grep', 'head', 'tail', 'sort', 'cut', 'uniq', 'expand'].includes(cmd);
+ // grep/head/tail/wc read terminal._pipeInput themselves (v4.6.111-116). Injecting the
+ // __pipebuf__ file for them made `cat f | grep x` match twice (the pipe buffer AND the cwd
+ // file of the same name) and printed "3 __pipebuf__" from wc.
+ return ['sort', 'cut', 'uniq', 'expand'].includes(cmd);
}
// ── Variable substitution ──