UNIX & GNU/Linux - tcsh - Setting prompt with country flags

If you have always dreamed to change the classic prompt of your favorite Shell, it is time to see how to do it. Open your tcsh's config that you can find in your home, it is called .tcshrc and inside, modify the line:

set prompt='(%n@%m %h)'


set prompt='<%T %/%B%{\033[1;31m%}>%{\033[0m%}%b'

Open a new terminal or juste write ". .bashrc" on your terminal, and miracle, you have now the time, your current path and a > in red and bold!

But if you want to have a flag of your favourite country on your prompt, you are also on the right place. Let's see some examples:

  • French flag:
set prompt=' %{\033[1;44m%} %{\033[0m%}%{\033[1;47m%} %{\033[0m%}%{\033[1;41m%} %{\033[0m%} ~ '
  • Belgian flag:
set prompt=' %{\033[1;40m%} %{\033[0m%}%{\033[1;43m%} %{\033[0m%}%{\033[1;41m%} %{\033[0m%} ~ '
  • Italian flag:
set prompt=' %{\033[1;42m%} %{\033[0m%}%{\033[1;47m%} %{\033[0m%}%{\033[1;41m%} %{\033[0m%} ~ '

If you prefer having a bash shell you can modify it too.




Hello BadproG

I have a code if you want about the swiss flag I let the following code at your disposition now I hope it will be beautiful at yours eyes

set prompt='<%{\033[1;31m%}Swit%{\033[0m%}zer%{\033[1;31m%}land%{\033[0m%} %{\033[1;41m%}+%{\033[0m%}>'

kspy ;)


Add new comment

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.