console color is not set correctly by .bashrc

Bug #223256 reported by Ömer Fadıl USTA
28
Affects Status Importance Assigned to Milestone
Ubuntu
Invalid
Undecided
Unassigned
bash (Ubuntu)
Fix Released
Low
Unassigned
console-tools (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: console-tools

Hello Everyone,
The .bashrc file in skel has suffering a color problem.
if you uncomment the force_color_prompt=yes statment it is not
working correctly because of not finished if statement.
I have prepared a small patch for fix .bashrc file
Could someone check the problem and my patch please ?

Revision history for this message
Ömer Fadıl USTA (omerusta) wrote : The force_colored_prompt has a typo and need rename

Hello There again
I have realized that the force_colored_prompt has a typo bug in .bashrc (thx apachelogger )
And i think the variable name is not suitable for that function
so i have changed its name and make a correct patch for .bashrc

Could you please recheck it ?

Revision history for this message
Harald Sitter (apachelogger) wrote :

Marking console-tools, as invalid /etc/skel/.bashrc is part of bash.
Patch looks good to me, though I would use enable_color_prompt since the invoked variable is also color_prompt.

Changed in bash:
importance: Undecided → Low
status: New → Triaged
Changed in console-tools:
status: New → Invalid
Frode M. Døving (frode)
Changed in console-tools:
status: Invalid → New
Revision history for this message
Immeëmosol (imme-emosol) wrote :

I would use enable_color_prompt as well.

Marked Bug #217736 as duplicate.

Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (4.7 KiB)

This bug was fixed in the package bash - 3.2-2ubuntu1

---------------
bash (3.2-2ubuntu1) intrepid; urgency=low

  * Merge with Debian; remaining changes:
    - Build from the upstream sources, build the documentation in info format.

bash (3.2-2) unstable; urgency=low

  * Add a shopt option compat31 to fall back to the behaviour of bash-3.1
    and earlier versions, in that quoting the string argument to the [[
    command's =~ +operator does not force string matching.

  * Merge from Ubuntu:
    - Remove /etc/skel/.bash_profile, if it is unmodified; if modified and
      /etc/skel/.profile is unmodifed, move .bash_profile to .profile.
    - /etc/skel/.bashrc: Add an option to blurt a terminal window with a
      colored prompt.
    - /etc/skel/.bashrc: Add color support for grep and friends (commented
      out by default). Closes: #420659.
    - /etc/skel/.profile: Avoid the use of `~'.
    - Don't run command-not-found from the shell scripts when it has been
      removed in the meantime.
  * /etc/skel/.bashrc:
    - Comment out the lesspipe settings. Closes: #470453.
    - Don't use PROMPT_COMMAND to set the title of an xterm. Closes: #420656.
    - Don't second-guess terminal handling in dircolors. Closes: #473870.
    - Don't overwrite GNU Midnight Commander's setting of HISTCONTROL to
      `ignorespace'. Closes: #440102.
    - Add a comment about setting HISTSIZE and HISTFILESIZE. Closes: #449587.
    - Append to the history file, don't overwrite it. Closes: #452459.
    - Use dir and vdir commands for dir vdir aliases. Closes: #420661.
  * /etc/skel/.profile:
    - Add comment about setting the umask for ssh logins. Closes: #314533.

  * Added code to defer the initialization of HISTSIZE until the history file
    is loaded. Closes: #383762.
  * Fix typos in README.Debian and preinst. Closes: #374452.
  * Mention `exec' builtin in the section `redirection'. Closes: #378067.
  * Add bashbug(1). Closes: #442477.
  * Fix typos in bash(1). Closes: #390493, #426687.
  * Fix bug in Bash_aliases example. Closes: #423488.
  * Fix typo in help message for caller builtin. Closes: #452656.

bash (3.2-1) experimental; urgency=low

  * New upstream version (including upstream patches 01 - 33). Closes: #431620.
    - Added write error reporting to printf builtin. Closes: #414285.
    - Fixed a bug that caused `unset LANG' to not properly reset the locale.
      Closes: #364861.
    - Describe expansion of pattern in case statement. Closes: #342225.
    - Improved handling of non-printable characters in prompt. Closes: #352234,
      #362010, #397086, #418961, #471490.
    - Fix typos in documentation. Closes: #382892.

    The syntax of regexes in Bash 3.2 was changed so that single quotes no
    longer surround regexes. e.g, a regex of the form
      if [[ "foo.tex" =~ '^(.*)\.tex$' ]]
    becomes
      if [[ "foo.tex" =~ ^(.*)\.tex$ ]]

  * Merge from Ubuntu:
    - debian/skel.bashrc: Check for dircolors before using it.
    - debian/skel.bashrc: Set HISTCONTROL to ignoreboth.
    - Include correct bash.pot file.
    - Move CWRU/changelog from the bash to the bash-doc package (we already
      have the CHANGES files).
    - debian/etc.bash.ba...

Read more...

Changed in bash:
status: Triaged → Fix Released
Changed in console-tools:
status: New → Invalid
Revision history for this message
Kemel Zaidan aka Legendario (kemelzaidan) wrote :

I have the package version 3.2-0ubuntu18 of bash and still have this bug. Is it right?

Revision history for this message
Michael Gefen (gefenm11) wrote :

the .bashrc file is in your home directory and is not affected by the fix.
you can copy the fixed version from /etc/skel

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.