mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Make the \c special character in echo suppress the newline too
This commit is contained in:
parent
7ee0ce745e
commit
57de1388e8
2 changed files with 3 additions and 2 deletions
|
@ -1633,7 +1633,7 @@ static int builtin_echo( parser_t &parser, wchar_t **argv )
|
|||
}
|
||||
}
|
||||
}
|
||||
if (print_newline)
|
||||
if (print_newline && continue_output)
|
||||
stdout_buffer.push_back('\n');
|
||||
return STATUS_BUILTIN_OK;
|
||||
}
|
||||
|
|
|
@ -83,7 +83,8 @@ echo -e 'abc\41def'
|
|||
echo -e 'abc\041def'
|
||||
echo -e 'abc\121def'
|
||||
echo -e 'abc\1212def'
|
||||
echo -e 'abc\cdef'
|
||||
echo -e 'abc\cdef' # won't output a newline!
|
||||
echo ''
|
||||
|
||||
echo -e Catch your breath
|
||||
|
||||
|
|
Loading…
Reference in a new issue