From 7095de628c8f05b2142827a74511cd1c979c5c90 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Tue, 26 Mar 2019 17:10:56 +0100 Subject: [PATCH] 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. --- src/parser.cpp | 5 +++-- tests/test_cmdsub.err | 5 +---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/parser.cpp b/src/parser.cpp index bbc1edf3a..a920b477d 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -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. diff --git a/tests/test_cmdsub.err b/tests/test_cmdsub.err index 5ef37be88..62819c597 100644 --- a/tests/test_cmdsub.err +++ b/tests/test_cmdsub.err @@ -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