Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Aliases for ls, cd, mv, etc.
- alias ls='ls -FG'
- alias ll='ls -lh'
- alias la='ls -lA'
- alias ..='cd ..'
- alias ...='cd ../..'
- alias ....='cd ../../..'
- alias mv='mv -i'
- # Some useful alias for Mac OS X
- alias nospotlight='sudo mdutil -a -i off'
- alias cleardnscache='sudo killall -HUP mDNSResponder'
- alias ldd='otool -L'
- alias seq='jot - '
- alias eject='drutil eject'
- # Set up bash completion
- set show-all-if-ambiguous On # show list automatically, without double tab
- # Set up less pager: ignore case on search, do not clear screen on exit, customized status bar
- export LESS='-iX --prompt="?f%f:<Standard input>. ?n?m(file %i of %m) ..?lt(lines %lt-%lb?L/%L.) :(byte %bB?s/%s.) .?e(END) ?x- Next\: %x.:?pB%pB\%..%t"'
- export MANPAGER='less -iX --prompt="?f%f:<Manual page>. ?n?m(file %i of %m) ..?lt(lines %lt-%lb?L/%L.) :(byte %bB?s/%s.) .?e(END) ?x- Next\: %x.:?pB%pB\%..%t"'
- # Prompt local "[17:57][user:~]$" y remoto "[17:57][user@machine:~]$"
- function __setprompt {
- local BLUE="\[\033[0;34m\]"
- local NO_COLOUR="\[\033[0m\]"
- local SSH_IP=`echo $SSH_CLIENT | awk '{ print $1 }'`
- local SSH2_IP=`echo $SSH2_CLIENT | awk '{ print $1 }'`
- if [ $SSH2_IP ] || [ $SSH_IP ] ; then
- local SSH_FLAG="@\h"
- fi
- PS1="$BLUE[\$(date +%H:%M)][\u$SSH_FLAG:\w]\\$ $NO_COLOUR"
- PS2="$BLUE>$NO_COLOUR "
- PS4='$BLUE+$NO_COLOUR '
- }
- __setprompt
- # Use Termcap to add color to man pages
- export LESS_TERMCAP_mb=$(tput bold; tput setaf 2) # green
- export LESS_TERMCAP_md=$(tput bold; tput setaf 6) # cyan
- export LESS_TERMCAP_me=$(tput sgr0)
- export LESS_TERMCAP_so=$(tput bold; tput setaf 3; tput setab 4) # yellow on blue
- export LESS_TERMCAP_se=$(tput rmso; tput sgr0)
- export LESS_TERMCAP_us=$(tput smul; tput bold; tput setaf 7) # white
- export LESS_TERMCAP_ue=$(tput rmul; tput sgr0)
- export LESS_TERMCAP_mr=$(tput rev)
- export LESS_TERMCAP_mh=$(tput dim)
- export LESS_TERMCAP_ZN=$(tput ssubm)
- export LESS_TERMCAP_ZV=$(tput rsubm)
- export LESS_TERMCAP_ZO=$(tput ssupm)
- export LESS_TERMCAP_ZW=$(tput rsupm)
- # Enable colored 'grep' output
- export GREP_OPTIONS="--color=auto"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement