Command saved incorrectly in history.

Alberto Millán <[email protected]>
Newsgroups gmane.comp.shells.bash.bugs
Message-ID <CAOTTF2rFY6qwMG3E4zYwfzKxHTHMVdRABnDosNfFDTfAsUkkXA@mail.gmail.com>
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -march=x86-64 -mtune=generic -O2 -pipe -fno-plt
-fexceptions         -Wp,-D_FORTIFY_SOURCE=3 -Wformat
-Werror=format-security         -fstack-clash-protection -fcf-protection
      -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -flto=auto
-DDEFAULT_PATH_VALUE='/usr/local/sbin:/usr/local/bin:/usr/bin'
-DSTANDARD_UTILS_PATH='/usr/bin' -DSYS_BASHRC='/etc/bash.bashrc'
-DSYS_BASH_LOGOUT='/etc/bash.bash_logout' -DNON_INTERACTIVE_LOGIN_SHELLS
-std=gnu17
uname output: Linux McAPC 6.18.45-1-MANJARO #1 SMP PREEMPT_DYNAMIC Wed, 19
Aug 2026 20:21:35 +0000 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu

Bash Version: 5.3
Patch Level: 15
Release Status: release

Description:
The command string is not stored correctly in the history when multiple
commands are chained together with '|&' on multiple lines.

Repeat-By:
1. Open an interactive Bash shell.
2. Type the first part of a pipeline, for example: `: |&`.
3. Press <Return> to continue on a new line and type the second part. For
example: `:`.
4. The command executes correctly, but the following is stored in the
history: `: |&; :`.

The problem does not occur when the pipeline is chained only with `|`. The
correct command is saved in the history: `: | :`.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.