.bashrc
changeset 18 2e991b769c95
parent 17 e11e0adb941b
child 30 669c0e5c3f58
equal deleted inserted replaced
17:e11e0adb941b 18:2e991b769c95
       
     1 
       
     2 # XXX
       
     3 # [ -f /etc/bashrc ] && . /etc/bashrc
       
     4 
       
     5 # XXX for mc, cvs, svn, ...
       
     6 # export EDITOR=vim
       
     7 
       
     8 # XXX vim and gnome-terminal have support for 256 colours in fedora 8 at least
       
     9 # Note debian/ubuntu users should install the ncurses-term package to support this
       
    10 # export TERM=xterm-256color
       
    11 
       
    12 # XXX highlight $HOST:$PWD prompt
       
    13 # PS1='\[\e[1m\]\h:\w\$\[\e[0m\] '
       
    14 PS1='bash# '
       
    15 
       
    16 # Don't store duplicate adjacent items in the history.
       
    17 #   ignorespace     do not save lines that start with space
       
    18 #   erasedups       all previous lines matching the current line to be removed from
       
    19 #                   the history list before that line is saved
       
    20 HISTCONTROL=igrorespace:erasedups
       
    21 
       
    22 # Don't store noisy/dumb items.
       
    23 HISTIGNORE=" ?cd *":"e *":"sudo mv *":"sudo rm *":"sudo cp *":"sudo mkdir *":"sudo chmod *":"sudo chown *":ls:pwd:"vlc*"
       
    24 
       
    25 # To these options assigned default value, as they satisfy my needs I comment them.
       
    26 # HISTFILE=~/.bash_history  # where is command history stored
       
    27 # HISTFILESIZE=500          # how many lines been in $HISTFILE
       
    28 # HISTSIZE=500              # how many lines been stored in bash process
       
    29 
       
    30 # Can be XXX /visible. I like bell.
       
    31 # set bell-style visible
       
    32 
       
    33 
       
    34 # Adjust settings according to current terminal window width
       
    35 # which may have changed while the last command was running
       
    36 # (which is a common occurance for vim/less/etc.)
       
    37 # Note this is already set in /etc/bashrc on Fedora 8 at least.
       
    38 shopt -s checkwinsize
       
    39 
       
    40 # Let me have core dumps
       
    41 ulimit -c unlimited
       
    42 
       
    43 
       
    44 #######################################
       
    45 # shortcut aliases
       
    46 #######################################
       
    47 
       
    48 alias ..="cd .."        #go to parent dir
       
    49 alias ...="cd ../.."    #go to grandparent dir
       
    50 alias -- -="cd -"       #go to previous dir
       
    51 alias l.='ls -d .*'     #list hidden files
       
    52 alias ll='ls -lhrt'     #extra info compared to "l"
       
    53 alias lld='ls -lUd */'  #list directories
       
    54 
       
    55 # make and change to a directory
       
    56 md () { mkdir -p "$1" && cd "$1"; }
       
    57 
       
    58 # GREP_COLOR=bright yellow on black bg.
       
    59 # use GREP_COLOR=7 to highlight whitespace on black terminals
       
    60 # LANG=C for speed. See also: http://www.pixelbeat.org/scripts/findrepo
       
    61 # alias grep='GREP_COLOR="1;33;40" LANG=C grep --color=auto'
       
    62 
       
    63 # alias ls="BLOCK_SIZE=\'1 ls --color=auto" #enable thousands grouping and colour
       
    64 # alias minicom='minicom -c on' #enable colour
       
    65 # alias cal='cal -3' #show 3 months by default
       
    66 # alias units='units -t' #terse mode
       
    67 # alias diff='LC_ALL=C TZ=GMT0 diff -Naur' #normalise diffs for distribution
       
    68 # alias lynx='lynx -force_html -width=$COLUMNS' #best settings for viewing HTML
       
    69 # alias links='links -force-html' #need to enable colour in config menu manually
       
    70 # alias xterm='xterm -fb "" -bg black -fg gray -fa "Sans Mono" -fs 10 +sb -sl 3000 -g 80x50+1+1'
       
    71 # alias sudo='sudo env PATH=$PATH' #work around sudo built --with-secure-path (ubuntu)
       
    72 # alias vim='vim -X' #don't try to contact xserver (which can hang on network issues)
       
    73 # alias gdb='gdb -tui' #enable the text window interface if possible
       
    74 
       
    75 # what most people want from od (hexdump)
       
    76 # alias hd='od -Ax -tx1z -v'
       
    77 
       
    78 # canonicalize path (including resolving symlinks)
       
    79 # alias realpath='readlink -f'