[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: Robert Elz
Subject: Re: greater-than + number sign = newlines in history
Date: Sun, 03 May 2020 19:50:06 +0700

    Date:        Sun, 3 May 2020 08:28:30 +0200
    From:        Tobias Wendorff <address@hidden>
    Message-ID:  <address@hidden>

  | 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

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).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]