Skip to content

Commit 9ea760c

Browse files
rodolfo-gattikrobelus
authored andcommitted
Accept |& as an alias for &|
Closes fish-shell#12565
1 parent d36c53c commit 9ea760c

15 files changed

Lines changed: 11 additions & 46 deletions

File tree

CHANGELOG.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ Improved terminal support
2323

2424
Other improvements
2525
------------------
26+
- For compatibility with Bash, fish now accepts ``|&`` as alternate spelling of ``&|``, for piping pipe both standard output and standard error (:issue:`11516`).
2627
- ``fish_indent`` now preserves comments and newlines immediately preceding a brace block (``{ }``) (:issue:`12505`).
2728

2829
For distributors and developers

doc_src/language.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ It is possible to pipe a different output file descriptor by prepending its FD n
235235

236236
will attempt to build ``fish``, and any errors will be shown using the ``less`` pager. [#]_
237237

238-
As a convenience, the pipe ``&|`` redirects both stdout and stderr to the same process. This is different from bash, which uses ``|&``.
238+
As a convenience, the pipe ``&|`` (as well as the ``|&`` alias which is also supported by Bash) both redirect stdout and stderr to the same process.
239239

240240
.. [#] A "pager" here is a program that takes output and "paginates" it. ``less`` doesn't just do pages, it allows arbitrary scrolling (even back!).
241241

localization/po/de.po

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1875,9 +1875,6 @@ msgstr "mit den Parametern '%s'"
18751875
msgid "with definition"
18761876
msgstr "mit Definition"
18771877

1878-
msgid "|& is not valid. In fish, use &| to pipe both stdout and stderr."
1879-
msgstr "|& ist ungültig. In fish, nutze &| um stdout und stderr gleichzeitig zu pipen"
1880-
18811878
#, c-format
18821879
msgid "…and %u more rows"
18831880
msgstr "…und %u weitere Zeilen"

localization/po/en.po

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1875,9 +1875,6 @@ msgstr ""
18751875
msgid "with definition"
18761876
msgstr ""
18771877

1878-
msgid "|& is not valid. In fish, use &| to pipe both stdout and stderr."
1879-
msgstr ""
1880-
18811878
#, c-format
18821879
msgid "…and %u more rows"
18831880
msgstr "…and %u more rows"

localization/po/es.po

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1878,9 +1878,6 @@ msgstr "con los argumentos '%s'"
18781878
msgid "with definition"
18791879
msgstr "con definición"
18801880

1881-
msgid "|& is not valid. In fish, use &| to pipe both stdout and stderr."
1882-
msgstr "|& no es válido. En fish, usa &| para redirigir stdout y stderr."
1883-
18841881
#, c-format
18851882
msgid "…and %u more rows"
18861883
msgstr "…y %u filas más"

localization/po/fr.po

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2004,9 +2004,6 @@ msgstr "avec les arguments « %s »"
20042004
msgid "with definition"
20052005
msgstr "avec la définition"
20062006

2007-
msgid "|& is not valid. In fish, use &| to pipe both stdout and stderr."
2008-
msgstr ""
2009-
20102007
#, c-format
20112008
msgid "…and %u more rows"
20122009
msgstr "…et %u lignes de plus"

localization/po/ja_JP.po

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1878,9 +1878,6 @@ msgid "with definition"
18781878
msgstr "定義されています"
18791879

18801880
# CHK
1881-
msgid "|& is not valid. In fish, use &| to pipe both stdout and stderr."
1882-
msgstr "|& は無効です。fish では、標準出力と標準エラー出力の両方をパイプするには &| を使用してください"
1883-
18841881
#, c-format
18851882
msgid "…and %u more rows"
18861883
msgstr "…他 %u 行"

localization/po/pl.po

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1871,9 +1871,6 @@ msgstr ""
18711871
msgid "with definition"
18721872
msgstr ""
18731873

1874-
msgid "|& is not valid. In fish, use &| to pipe both stdout and stderr."
1875-
msgstr ""
1876-
18771874
#, fuzzy, c-format
18781875
msgid "…and %u more rows"
18791876
msgstr "…and %u więcej rzędów"

localization/po/pt_BR.po

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1876,9 +1876,6 @@ msgstr ""
18761876
msgid "with definition"
18771877
msgstr "com definição"
18781878

1879-
msgid "|& is not valid. In fish, use &| to pipe both stdout and stderr."
1880-
msgstr ""
1881-
18821879
#, fuzzy, c-format
18831880
msgid "…and %u more rows"
18841881
msgstr "…e mais %u linhas"

localization/po/sv.po

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1872,9 +1872,6 @@ msgstr ""
18721872
msgid "with definition"
18731873
msgstr ""
18741874

1875-
msgid "|& is not valid. In fish, use &| to pipe both stdout and stderr."
1876-
msgstr ""
1877-
18781875
#, fuzzy, c-format
18791876
msgid "…and %u more rows"
18801877
msgstr "…och %u rader till"

0 commit comments

Comments
 (0)