Tag: prompt

  • One World Host: .bash_profile

    # path for mysql PATH=$PATH:/usr/local/mysql-4.0.26/bin # the path for subversion PATH=$PATH:~/subversion/bin # prompt export PS1=”\n\h:\w \u\$ ” export PS2=”\n>” # environment variables export CLICOLOR=1 export EDITOR=`which pico` # repository variables export CVSEDITOR=$EDITOR export CVS_RSH=`which ssh` export SVN_EDITOR=$EDITOR # aliases alias l=”ls -l” alias ll=”ls -al” alias lf=”ls -F” alias ~=”cd ~” alias ..=”cd ..” alias…

  • Customize your promt and make it dynamical

    This lines of code show be in your .bash_profile. You can change the color or/and the info that appears in your prompt. export MAX_PATH_LENGTH=25 export PROMPT_COMMAND=’PS1=”\[\033[0;33m\][\!]\`if [[ \$? = “0” ]]; then echo “\\[\\033[32m\\]”; else echo “\\[\\033[31m\\]”; fi\`[\u.\h: \`if [[ `pwd|wc -c|tr -d ” “` > $MAX_PATH_LENGTH ]]; then echo “\\W”; else echo “\\w”; fi\`]\$\[\033[0m\]…