Reallow "2>>&1" as a redirection

Appending to an fd doesn't really make sense, but we allowed the
syntax previously and it was actually used.

It's not too harmful to allow it, so let's just do that again.

For the record: Zsh also allows it, bash doesn't.

Fixes #6614
This commit is contained in:
Fabian Homborg
2020-02-17 08:52:41 +01:00
parent 96587d26f5
commit aba900a71f
2 changed files with 8 additions and 2 deletions

View File

@@ -8,6 +8,11 @@ end
outnerr 0 &| count
#CHECK: 2
outnerr appendfd 2>>&1
#CHECK: out appendfd
#CHECK: err appendfd
set -l tmpdir (mktemp -d)
outnerr overwrite &>$tmpdir/file.txt
cat $tmpdir/file.txt