[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [sr #108491] Is `set -o histexpand` meant to trump `set -o posix`? [
Re: [sr #108491] Is `set -o histexpand` meant to trump `set -o posix`? [eg, echo "#!/"] (Because it does.)
Sat, 1 Feb 2014 19:35:06 -0500 (EST)
So having done some more playing around with this, I've found that when
bash is configured and compiled with '--enable-strict-posix-default',
this doesn't occur. I see this is documented in the change log for
k. When compiled for strict Posix conformance, history expansion is
disabled by default.
But why is this a compile-time-only behavior?
There's nothing else in the documentation about any differences between
bash compiled with -DSTRICT_POSIX v.s. enabling this mode with `bash
--posix`. It just says that POSIX mode will become a default option.
And reverse also seems to be true; if you compile with -DSTRICT_POSIX,
invoke the shell, then 'set +o posix', history expansion remains
disabled? This definitely seems like it could cause some trouble.
Summary: Is `set -o histexpand` meant to trump `set -o posix`? [eg,
echo "#!/"] (Because it does.)
Project: The GNU Bourne-Again SHell
Submitted by: None
Submitted on: Sat 01 Feb 2014 01:32:34 PM UTC
Priority: 5 - Normal
Severity: 5 - Blocker
Assigned to: None
Originator Email: address@hidden
Discussion Lock: Any
Operating System: *BSD
To: address@hidden, address@hidden,
Subject: Is `set -o histexpand` meant to trump `set -o posix`? [eg,
echo "#!/"] (It does.)
Configuration Information [Automatically generated, do not change]:
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DSHELL -DHAVE_CONFIG_H -DMACOSX -DDEBUG -DMALLOC_DEBUG -I. -I.
-I./include -I./lib -g -O2
uname output: Darwin air.local 13.1.0 Darwin Kernel Version 13.1.0: Thu
19:40:37 PST 2014; root:xnu-2422.90.20~2/RELEASE_X86_64 x86_64
Machine Type: x86_64-apple-darwin13.1.0
Bash Version: 4.3
Patch Level: 0
Release Status: rc2
Please see these:
Its still not at all clear to me if I'm correct or not; and I kind of
serious beatdown for calling it a bug on Stack Overflow. So I'm not
this is a 'blocker' per se or even something you'll consider a bug. But
certainly blocks me from wanting to using bash to execute a
(Note that I now fully realize my statement there to the effect of
sees any updates so use a different shell' is erroneous. I made this
because a keep a git checkout on my hard drive which gets pulled daily
your master branch is configured to track 4.2 rather than devel, so
what I thought was indeed the case. I was completely aghast to find
is in rc2 having just made that statement, and I intend to redact it a
there's some resolution to this "bug", be it a bug or not.)
I apologize if this appears in your inbox two dozen times. I don't know
sendmail even works at all on my system; and there are three slightly
different emails in the bashbug script, in git, and the top hit in a web
search for your name. I'm trying to make sure this gets seen before the
'release' button gets pushed for 4.3.
set -o histexpand && set -o posix && echo "#!/"
set -o histexpand && set -o posix && echo "#!/bin/bash"
Disable `set -o histexpand` while parsing and expanding double-quoted
strings, at least for lines which begin with a hash symbol,
when `set -o posix` is set.
Reply to this item at:
- Re: [sr #108491] Is `set -o histexpand` meant to trump `set -o posix`? [eg, echo "#!/"] (Because it does.),
Geoff Nixon <=