Remove "called on standard input" message

This was printed basically everywhere.

The user knows what they executed on standard input.

A good example:

```fish
set c (subme 513)
```

used to print

```
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
```

and now it is

```
fish: Too much data emitted by command substitution so it was discarded

    set -l x (string repeat -n $argv x)
             ^
in function 'subme' with arguments '513'
in command substitution
```

See #5434.
This commit is contained in:
Fabian Homborg 2019-03-26 17:10:56 +01:00
parent 975023faf2
commit 7095de628c
2 changed files with 4 additions and 6 deletions

View File

@ -405,6 +405,7 @@ void parser_t::stack_trace_internal(size_t block_idx, wcstring *buff) const {
}
}
// Print where the function is called.
const wchar_t *file = b->src_filename;
if (file) {
@ -413,9 +414,9 @@ void parser_t::stack_trace_internal(size_t block_idx, wcstring *buff) const {
} else if (is_within_fish_initialization()) {
append_format(*buff, _(L"\tcalled during startup\n"));
} else {
append_format(*buff, _(L"\tcalled on standard input\n"));
// This one is way too noisy
// append_format(*buff, _(L"\tcalled on standard input\n"));
}
}
// Recursively print the next block.

View File

@ -15,11 +15,8 @@ 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 function 'subme' with arguments '513'
in command substitution
called on standard input
####################
# Make sure output from builtins outside of command substitution is not affected