#345447 bash: job control messages not properly escaped

Package:
bash
Source:
bash
Description:
GNU Bourne Again SHell
Submitter:
Marc Lehmann
Date:
2024-04-29 02:27:02 UTC
Severity:
minor
#345447#5
Date:
2005-12-31 15:58:28 UTC
From:
To:
Commands echoed injob control messages are not properly escaped.

To illustrate, try this in an xterm/rxvt:

   (: "^[[31m") &
       ^^ replace this by ctrl-v escape
          to insert a _verbatim_ escape character,
          i.e. <ctrl-v> <escape> '[' '3' etc.

You'll get something similar to this:

   cerebro ~# (: "^[[31m") &
   [1] 7305
   [1]   Done                    ( : "" )
   cerebro ~#

except that the text is red starting with the last '"' character, in
the "Done" message, as the escape [31m command sequence has been output
verbatim to the terminal, instead of quoting it as when inputting it.

The output of the jobs builtin and other messages are also affected.