Gnus/5.110003 (No Gnus v0.3) Emacs/21.4 (gnu/linux)
michael@mail.endbracket.net wrote:
> 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.
How exactly are you setting your prompt?
> $ connectioninfo='${HOST%%.*} ${USER}'
> $ echo $connectioninfo
This doesn't demonstrate any misbehavior in parameter expansion,
because ${HOST%%.*} does not undergo parameter expansion at all - in
the first line, because it is quoted, and in the second line, because
it is the result of parameter expansion. Try this instead:
$ echo ${HOST%%.*} ${USER}
This way, the HOST and USER parameters are expanded. On my system, it
gives the same output regardless of whether $HOST contains a dot or
whether any existing files match.
paul