🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.bash.bug
Article #753

bug in expand_string("\", 1) ???

#753
From: ultra!rmg
Date: Sun, 19 Nov 1989 02:59
29 lines
1159 bytes
With bash 1.04, Sparcstation 1, SunOS 4.0.3:

Stumbled across this, perhaps it's a bug:

When expand_string() is called in decode_prompt_string (file parse.y),
if the sting to be expanded ends in "\", then the expanded string
seems to get some extra stuff appended to it. for example:

Script started on Sat Nov 18 18:55:14 1989
bash$ PS1="\\"
\UUUU				<- just press return here a few times
\UUUU,UUUU
\UUUULUUUU
\UUUUlUUUUUUUUUUUUT
\UUUUlUUUUUUUU
\UUUUNO_PROMPT_VARS=1		<- no with NO_PROMPT_VARS
\
\PS1='bash$ ' 
bash$ exit

script done on Sat Nov 18 18:56:25 1989

This really isn't earth shattering - I use NO_PROMPT_VARS anyway, but
it might bite somewhere else.

  Thanks,

  rmg@ultra.com
Technical Details
Message-ID: <8911190259.AA13187@ultra.com>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!shelby!apple!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!AMES.ARC.NASA.GOV!ultra!rmg

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!shelby!apple!gem.mps.ohio-state.edu!tut.cis.ohio-state.edu!AMES.ARC.NASA.GOV!ultra!rmg
From: ultra!rmg@AMES.ARC.NASA.GOV
Newsgroups: gnu.bash.bug
Subject: bug in expand_string("\", 1) ???
Message-ID: <8911190259.AA13187@ultra.com>
Date: 19 Nov 89 02:59:53 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 29