mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-27 11:43:37 +08:00
4197420f39
This makes command substitutions impose the same limit on the amount of data they accept as the `read` builtin. It does not limit output of external commands or builtins in other contexts. Fixes #3822
23 lines
654 B
Plaintext
23 lines
654 B
Plaintext
# Command sub at the limit should fail.
|
|
fish: Too much data emitted by command substitution so it was discarded
|
|
|
|
set b (string repeat -n 512 x)
|
|
^
|
|
# Command sub over the limit should fail.
|
|
fish: Too much data emitted by command substitution so it was discarded
|
|
|
|
set -l x (string repeat -n $argv x)
|
|
^
|
|
in function 'subme'
|
|
called on standard input
|
|
with parameter list '513'
|
|
|
|
in command substitution
|
|
called on standard input
|
|
|
|
# Same builtin in a command substitution is affected
|
|
fish: Too much data emitted by command substitution so it was discarded
|
|
|
|
echo this will fail (string repeat --max 513 b) to output anything
|
|
^
|