bug-bash
[Top][All Lists]
Advanced

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

Re: inconsistent treatment of backslash-bang


From: Lawrence D'Oliveiro
Subject: Re: inconsistent treatment of backslash-bang
Date: Sat, 19 Jul 2008 17:29:37 +1200
User-agent: Microsoft-Outlook-Express-Macintosh-Edition/5.0.6

Chet Ramey wrote:

> I already explained that bash follows csh as closely as possible
> in its history expansion implementation.

Well, it doesn't:

ldo@hypatia:~> /bin/tcsh
hypatia /home/ldo> echo hi there!0
0: Event not found.
hypatia /home/ldo> echo "hi there!0"
0: Event not found.
hypatia /home/ldo> echo "hi there\!0"
hi there!0
hypatia /home/ldo> echo hi there\!0
hi there!0

(Compare the bash output in my bug report.)

> This means that backslash doesn't escape the !, and isn't removed.

If it doesn't escape the !, then how come the ! doesn't have its usual
history-expansion meaning? Either \ acts as an escape or it doesn't, having
it part of one and part of the other is an inconsistency. Simple as that.





reply via email to

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