Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #16269
| From | Robert Elz <kre@munnari.OZ.AU> |
|---|---|
| Newsgroups | gnu.bash.bug |
| Subject | Re: greater-than + number sign = newlines in history |
| Date | 2020-05-03 21:48 +0700 |
| Message-ID | <mailman.1952.1588517361.3066.bug-bash@gnu.org> (permalink) |
| References | <0c8f8899-0421-0aa7-2ecd-2167018c3924@gmx.de> <bb08b099-59bd-5f04-4074-bbc046e99c6c@gmx.de> <11091.1588510206@jinx.noi.kre.to> <16697.1588517331@jinx.noi.kre.to> |
Date: Sun, 3 May 2020 15:58:59 +0200
From: Tobias Wendorff <tobwen@gmx.de>
Message-ID: <0c8f8899-0421-0aa7-2ecd-2167018c3924@gmx.de>
| Is this behavior planned or unplanned? The problem doesn't seem to
| appear on Bash 4 (Debian Jessie, Cygwin on Windows).
Not for me to say, but I'd expect unplanned (ie: a bug).
| On IRC, an user gave me the hint to set `shopt -s lithist`, which seems
| to work. The documentation of `lithist` is very ambiguous, so I don't
| know the downside of this option.
Interesting, an option I haven't used. If it acts like it says it should,
the only downside should be the appearance of multi-line history entries,
for the command
while sleep 4
do
echo awake
done
instead of the normal
while sleep 4; do echo awake; done
in the historu, you get the original, with the newlines embedded
(though it appears some semi-colons are still added), that is, I got
while sleep 4;
do
echo awake
done
(I didn't really type the indented "echo" as shown above).
That ';' is harmless. The longer form just makes history entries
occupy more vertical space, and be slightly harder (IMO) to edit,
otherwise there should be no difference.
kre
Back to gnu.bash.bug | Previous | Next | Find similar
Re: greater-than + number sign = newlines in history Robert Elz <kre@munnari.OZ.AU> - 2020-05-03 21:48 +0700
csiph-web