mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-28 04:35:09 +00:00
Print "^^" for a 2-wide error
This commit is contained in:
parent
eaf92918e6
commit
c1bf06d5b1
2 changed files with 2 additions and 2 deletions
|
@ -132,7 +132,7 @@ wcstring parse_error_t::describe_with_prefix(const wcstring &src, const wcstring
|
||||||
// ^~~^
|
// ^~~^
|
||||||
// With a "^" under the start and end, and squiggles in-between.
|
// With a "^" under the start and end, and squiggles in-between.
|
||||||
auto width = fish_wcswidth(src.c_str() + source_start, source_length);
|
auto width = fish_wcswidth(src.c_str() + source_start, source_length);
|
||||||
if (width > 2) {
|
if (width >= 2) {
|
||||||
// Subtract one for each of the carets - this is important in case
|
// Subtract one for each of the carets - this is important in case
|
||||||
// the starting char has a width of > 1.
|
// the starting char has a width of > 1.
|
||||||
result.append(width - 2, L'~');
|
result.append(width - 2, L'~');
|
||||||
|
|
|
@ -32,7 +32,7 @@ echo noclobber &>>?$tmpdir/file.txt
|
||||||
eval "echo foo |& false"
|
eval "echo foo |& false"
|
||||||
#CHECKERR: {{.*}} |& is not valid. In fish, use &| to pipe both stdout and stderr.
|
#CHECKERR: {{.*}} |& is not valid. In fish, use &| to pipe both stdout and stderr.
|
||||||
#CHECKERR: echo foo |& false
|
#CHECKERR: echo foo |& false
|
||||||
#CHECKERR: ^
|
#CHECKERR: ^^
|
||||||
|
|
||||||
# Ensure that redirection empty data still creates the file.
|
# Ensure that redirection empty data still creates the file.
|
||||||
rm -f $tmpdir/file.txt
|
rm -f $tmpdir/file.txt
|
||||||
|
|
Loading…
Reference in a new issue