Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: Robert Elz Newsgroups: gnu.bash.bug Subject: Re: greater-than + number sign = newlines in history Date: Sun, 03 May 2020 19:50:06 +0700 Lines: 26 Approved: bug-bash@gnu.org Message-ID: References: <11091.1588510206@jinx.noi.kre.to> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: usenet.stanford.edu 1588510728 21531 209.51.188.17 (3 May 2020 12:58:48 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash@gnu.org To: Tobias Wendorff Envelope-to: bug-bash@gnu.org In-Reply-To: Received-SPF: permerror client-ip=2001:3c8:9009:181::2; envelope-from=kre@munnari.OZ.AU; helo=munnari.OZ.AU X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, T_SPF_HELO_PERMERROR=0.01, T_SPF_PERMERROR=0.01, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: <11091.1588510206@jinx.noi.kre.to> X-Mailman-Original-References: Xref: csiph.com gnu.bash.bug:16267 Date: Sun, 3 May 2020 08:28:30 +0200 From: Tobias Wendorff Message-ID: | When creating a here document containing the greater-than sign followed | by number sign, newlines get added to Bash history: The example given showed a less than, rather than greater than, but that turns out to be irrelevant, it is the '#' that is triggering this. Any line in a here doc that contains a # gets an extra \n appended to it in history (doesn't matter if the end marker is quoted or not, doesn't seem to matter what else is on the line, if anything, with the '#'. (Obviousl;y I haven't tested every possibility). If the history entry is used (up-arrow, return) to replay the command, a new entry will be made with extra \n chars in it (the repeated command is not seen as a duplicate - I have the var set to have dup commands saved just once). kre kre