Bash Syntax Colouring

6,248

Real time syntax coloring is a lot of work, especially with shells whose syntax is trickier than fish's. Only fish has it out of the box.

Zsh has syntax coloring if you install the zsh-syntax-highlighting add-on.

I'm not aware of any effort to do this with bash.

Share:
6,248

Related videos on Youtube

MadTux
Author by

MadTux

I am a big Arch Linux fan, who tries to convert poor, deluded Windows lUsers. I am also a big fan of Apple Hardware and packaging :D And I'm a complete Lord of the Rings and Middle-earth freak. This is a profile page virus. Add me to your profile page so I can multiply.

Updated on September 18, 2022

Comments

  • MadTux
    MadTux over 1 year

    I tried the fish shell, and love the fact that it does syntax colouring in the shell itself: fish syntax colouring

    Is there some way to do this in bash?

    • Admin
      Admin over 10 years
      I think you have to actually modify the Bash code in order to do that.
    • Admin
      Admin over 3 years
      There is essentially the same question at superuser.com/q/304211/980046
  • Karlson
    Karlson over 10 years
    The question is more generic then just prompting.
  • MadTux
    MadTux over 10 years
    I have already customized the heck out of $PS1 and $PS2 ;)
  • joharr
    joharr about 4 years
    You've answered a different question, even if well.
  • SuperSandro2000
    SuperSandro2000 over 2 years
    ble.sh is the only thing I know that comes close to this.