X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=.profile;h=4b7368a84e5bdd4e0d67968ce39c689407083d2e;hb=fdbdf000588058f845f8a9edbe5ec3157189f680;hp=a3981654b8335650b053d99b6a95d4c84c921f73;hpb=6d8fcbe56b488f473406ef26c0c7a3cc2a4f0ce1;p=dotfiles.git diff --git a/.profile b/.profile index a398165..4b7368a 100644 --- a/.profile +++ b/.profile @@ -75,8 +75,12 @@ if [ -t 0 ] ; then ;; esac + if [ -x /usr/bin/dircolors ]; then + test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)" + fi + PAGER=less - LESS="gimq" + LESS="FRXgimq" case "$LC_CTYPE" in *UTF-8) LESSCHARSET=utf-8 ;; @@ -135,7 +139,24 @@ if [ -t 0 ] ; then case "$SHELL" in */bash) shopt -s checkwinsize - OPS1='\u@\h ' + # display the user, host and current working directory + # in the terminal title + case "$TERM" in + *rxvt*|screen*|*term*|vt100) + OPS1="\[\033]0;\u@\h:\w\007\]" + case "$TERM" in + screen*) + OPS1+"\[\033k\u@\h:\w\033\\\]" # Set screen/tmux caption + ;; + esac + ;; + + *) + OPS1="" + ;; + esac + + OPS1+="\u@\h \W " . "$ENV" ;; *) @@ -143,16 +164,8 @@ if [ -t 0 ] ; then ;; esac - export OPS1 - - case "$TERM" in - *rxvt*|screen*|*term*|vt100) - if [ -x "`which xtitle 2>/dev/null`" ]; then - PROMPT_COMMAND=xtitle - export PROMPT_COMMAND - fi - ;; - esac + #PROMPT_DIRTRIM=2 + export OPS1 # PROMPT_DIRTRIM ### biff controls new mail notification #biff n