- Timestamp:
- Aug 28, 2012 8:37:44 AM (12 years ago)
- Branches:
- master, trunk
- Children:
- e59cf50
- Parents:
- 7c991ad
- Location:
- TipAndDoc
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TipAndDoc/.bashrc
rd1c9ece rb949a0f 1 # ~/.bashrc: executed by bash(1) for non-login shells.2 # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)3 # for examples4 5 # If not running interactively, don't do anything6 [ -z "$PS1" ] && return7 8 # don't put duplicate lines in the history. See bash(1) for more options9 export HISTCONTROL=ignoredups10 # ... and ignore same sucessive entries.11 export HISTCONTROL=ignoreboth12 13 # check the window size after each command and, if necessary,14 # update the values of LINES and COLUMNS.15 shopt -s checkwinsize16 17 # make less more friendly for non-text input files, see lesspipe(1)18 [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"19 20 # set variable identifying the chroot you work in (used in the prompt below)21 if [ -z "$debian_chroot" ] && [ -r /etc/debian_chroot ]; then22 debian_chroot=$(cat /etc/debian_chroot)23 fi24 25 # set a fancy prompt (non-color, unless we know we "want" color)26 case "$TERM" in27 xterm-color) color_prompt=yes;;28 esac29 30 # uncomment for a colored prompt, if the terminal has the capability; turned31 # off by default to not distract the user: the focus in a terminal window32 # should be on the output of commands, not on the prompt33 #force_color_prompt=yes34 35 if [ -n "$force_color_prompt" ]; then36 if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then37 # We have color support; assume it's compliant with Ecma-4838 # (ISO/IEC-6429). (Lack of such support is extremely rare, and such39 # a case would tend to support setf rather than setaf.)40 color_prompt=yes41 else42 color_prompt=43 fi44 fi45 46 if [ "$color_prompt" = yes ]; then47 PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '48 else49 PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '50 fi51 unset color_prompt force_color_prompt52 53 # If this is an xterm set the title to user@host:dir54 case "$TERM" in55 xterm*|rxvt*)56 PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME}: ${PWD/$HOME/~}\007"'57 ;;58 *)59 ;;60 esac61 62 # Alias definitions.63 # You may want to put all your additions into a separate file like64 # ~/.bash_aliases, instead of adding them here directly.65 # See /usr/share/doc/bash-doc/examples in the bash-doc package.66 67 #if [ -f ~/.bash_aliases ]; then68 # . ~/.bash_aliases69 #fi70 71 # enable color support of ls and also add handy aliases72 if [ "$TERM" != "dumb" ] && [ -x /usr/bin/dircolors ]; then73 eval "`dircolors -b`"74 alias ls='ls --color=auto'75 #alias dir='ls --color=auto --format=vertical'76 #alias vdir='ls --color=auto --format=long'77 78 #alias grep='grep --color=auto'79 #alias fgrep='fgrep --color=auto'80 #alias egrep='egrep --color=auto'81 fi82 83 # some more ls aliases84 #alias ll='ls -l'85 #alias la='ls -A'86 #alias l='ls -CF'87 88 1 # enable programmable completion features (you don't need to enable 89 2 # this, if it's already enabled in /etc/bash.bashrc and /etc/profile … … 96 9 ulimit -c 0 # no dump core 97 10 export PAGER=less 98 export LESS='- X -i -P ?f%f:(stdin). ?lb%lb?L/%L.. [?eEOF:?pb%pb\%..]'11 export LESS='-FRX -i -P ?f%f:(stdin). ?lb%lb?L/%L.. [?eEOF:?pb%pb\%..]' 99 12 100 13 HISTSIZE=50000 … … 120 33 } 121 34 35 if [ -f $BASH_COMPLETION_DIR/git ]; then 36 export PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(__git_ps1)\$ ' 37 else 38 export PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' 39 fi 40 122 41 alias vi='vim' 123 42 alias sudo='sudo -H '
Note: See TracChangeset
for help on using the changeset viewer.