Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ## Dica retirada do Dicas-L:
- # http://www.dicas-l.com.br/arquivo/mudanca_de_cor_do_prompt_para_o_usuario_root.php
- function setprompt
- {
- local BLUE='\[$(tput setaf 4)\]'
- local RED='\[$(tput setaf 1)\]'
- local RESET='\[$(tput sgr0)\]'
- # Se 'id -u' retornar 0, você tem
- # privilégios de superusuário
- if [ `id -u` = 0 ]
- then
- PS1="$RED[\u@\h:\W]$RESET "
- else
- PS1="$BLUE[\u@\h:\W]$RESET "
- fi
- }
- setprompt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement