mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-06 10:08:47 +00:00
Readd ^&1
redirection
This was lost in35671dd9f0
. Even tho we plan to drop caret redirection, while it's there it should fully work. Fixes #6591. (cherry picked from commit13b470af07
)
This commit is contained in:
parent
cecb0ebbbc
commit
eea919f97e
2 changed files with 8 additions and 1 deletions
|
@ -412,7 +412,12 @@ maybe_t<pipe_or_redir_t> pipe_or_redir_t::from_string(const wchar_t *buff) {
|
|||
consume(L'^');
|
||||
result.fd = STDERR_FILENO;
|
||||
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;
|
||||
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: {{.*}}
|
Loading…
Reference in a new issue