Find the answer to your Linux question:
Results 1 to 3 of 3
Something I use on Windows with 4NT (and 4DOS and 4OS2 before that) is to display the command line input in yellow. On Bash, I find it hard to locate ...
  1. #1
    Just Joined!
    Join Date
    May 2011
    Location
    Texas
    Posts
    5

    Bash - colored command line

    Something I use on Windows with 4NT (and 4DOS and 4OS2 before that) is to display the command line input in yellow. On Bash, I find it hard to locate visually where the current bunch of output started, since it doesn't have a clear separator.

    I'm not asking about how to colorize the prompt, though I guess that would help too. I mean if I have a xterm that looks like:

    Code:
    Compilation failed in require at test.perl line 28.
    BEGIN failed--compilation aborted at test.perl line 28.
    xxxxxxxxx$ perl test.perl document.txt  >docout.html
    build_parser_rules called!  Text::Creole::InlineFormat
    (?sx-im:(?<prematch>.*?)
    The stuff I typed on the command prompt line is in a different color.

  2. #2
    oz
    oz is offline
    forum.guy
    Join Date
    May 2004
    Location
    arch linux
    Posts
    18,096
    Check the following HowTo article to see if it helps you achieve your objective:

    https://wiki.archlinux.org/index.php/Color_Bash_Prompt

    It was written for Arch Linux users but should also work with other distributions.
    oz

    new members/users: read this first | new member faq
    no private messages requesting computer support - post them on the forums!
    please use the "report post" button to alert our forum admins to problematic posts rather than responding to them yourself.

  3. #3
    Just Joined!
    Join Date
    May 2011
    Location
    Texas
    Posts
    5
    Yes, that helped. At the very end (I almost missed it, since it just seemed to be about using PS1 and colors) was a note on using a "debug trap" to change the color back after entering the command line.

    Thanks for pointing that out!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...