aboutsummaryrefslogtreecommitdiffhomepage
path: root/parse_util.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-01-13 12:51:09 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-01-13 12:51:09 -0800
commiteb28c710baa385cbd9b979e99736ef65b16de0db (patch)
treeda3aab10d6fcfd091931a97a3ec5f338fa048af3 /parse_util.cpp
parent6fc1d7dc7705c9e6376ae220f1f7afa85434dc26 (diff)
Improve the 'This command can not be used in a pipeline' message to
actually name the command
Diffstat (limited to 'parse_util.cpp')
-rw-r--r--parse_util.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse_util.cpp b/parse_util.cpp
index 027a0e9b..eded7b93 100644
--- a/parse_util.cpp
+++ b/parse_util.cpp
@@ -44,7 +44,7 @@
/**
Error message for improper use of the exec builtin
*/
-#define EXEC_ERR_MSG _(L"This command can not be used in a pipeline")
+#define EXEC_ERR_MSG _(L"The '%ls' command can not be used in a pipeline")
int parse_util_lineno(const wchar_t *str, size_t offset)
{
@@ -1035,7 +1035,7 @@ parser_test_error_bits_t parse_util_detect_errors(const wcstring &buff_src, pars
// 'or' and 'and' can be first in the pipeline. forbidden commands cannot be in a pipeline at all
if (node_tree.plain_statement_is_in_pipeline(node, is_pipe_forbidden))
{
- errored = append_syntax_error(&parse_errors, node, EXEC_ERR_MSG);
+ errored = append_syntax_error(&parse_errors, node, EXEC_ERR_MSG, command.c_str());
}
}