mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-08 19:31:14 -03:00
Readd ^&1 redirection
This was lost in 35671dd9f0.
Even tho we plan to drop caret redirection, while it's there it should
fully work.
Fixes #6591.
This commit is contained in:
@@ -412,7 +412,12 @@ maybe_t<pipe_or_redir_t> pipe_or_redir_t::from_string(const wchar_t *buff) {
|
|||||||
consume(L'^');
|
consume(L'^');
|
||||||
result.fd = STDERR_FILENO;
|
result.fd = STDERR_FILENO;
|
||||||
result.mode = redirection_mode_t::overwrite;
|
result.mode = redirection_mode_t::overwrite;
|
||||||
if (try_consume(L'^')) result.mode = redirection_mode_t::append;
|
if (try_consume(L'^')) {
|
||||||
|
result.mode = redirection_mode_t::append;
|
||||||
|
} else if (try_consume(L'&')) {
|
||||||
|
// This is a redirection to an fd.
|
||||||
|
result.mode = redirection_mode_t::fd;
|
||||||
|
}
|
||||||
if (try_consume(L'?')) result.mode = redirection_mode_t::noclob;
|
if (try_consume(L'?')) result.mode = redirection_mode_t::noclob;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
2
tests/checks/features-nocaret5.fish
Normal file
2
tests/checks/features-nocaret5.fish
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
#RUN: %fish --features no-stderr-nocaret -c 'ls /abavojijsdfhdsjhfuihifoisj ^&1'
|
||||||
|
# CHECK: ls: {{.*}}
|
||||||
Reference in New Issue
Block a user