[EMAIL PROTECTED] wrote: > Bash Version: 3.0 > Patch Level: 16 > Release Status: release > > Description: > I had been using ${HOSTNAME%%.*} in my prompt to show the local > host name portion of my full host name (e.g. localhost instead > of localhost.localdomain). After enabling the nullglob shell > option, this pattern is being replaced by a null string. I > don't think this behavior is desireable.
Perhaps not desirable, but, in the example you supplied, functioning as designed. > > I don't fully understand the wording of the relevant portion of > the POSIX standard on this topic, but I would expect this > pattern to always function as it does without nullglob set: That part of the POSIX standard isn't relevant for two reasons. First, POSIX doesn't standardize `nullglob'. Second, the expansion described is not happening. What happens in the example you show is that a word that looks like a parameter expansion is part of the expanded value of $connectioninfo, but that word is not being expanded as a parameter. It's subject to the normal glob expansion that the unquoted results of any parameter expansion would be, and, since it doesn't match any filenames, is removed when `nullglob' is enabled. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ( ``Discere est Dolere'' -- chet ) Live...Laugh...Love Chet Ramey, ITS, CWRU [EMAIL PROTECTED] http://cnswww.cns.cwru.edu/~chet/ _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash