Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #16274

Re: greater-than + number sign = newlines in history

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: greater-than + number sign = newlines in history
Date 2020-05-04 08:58 -0400
Organization ITS, Case Western Reserve University
Message-ID <mailman.2059.1588597098.3066.bug-bash@gnu.org> (permalink)
References <bb08b099-59bd-5f04-4074-bbc046e99c6c@gmx.de> <be89d8aa-e9db-bb3d-a874-b6d1e2a57790@case.edu>

Show all headers | View raw


On 5/3/20 2:28 AM, Tobias Wendorff wrote:

> Bash Version: 5.0
> Patch Level: 3
> Release Status: release
> 
> Description:
> When creating a here document containing the greater-than sign followed
> by number sign, newlines get added to Bash history:
> ```
> $ history
>   1  cat << 'EOF' > /dev/null
> <#a
> 
> <#b
> 
> EOF> ```

Thanks for the report. It's not the less-than sign; it's the hash character
that makes the difference. The command-oriented history mode has to pay
attention to those, because shell comments are one place where you can't
replace a newline with a semicolon. It just needs to also pay attention to
the fact that bash is reading a here-document.

This was reported and fixed in October, 2019, and the fix is in the devel
branch.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: greater-than + number sign = newlines in history Chet Ramey <chet.ramey@case.edu> - 2020-05-04 08:58 -0400

csiph-web