Changeset 28 in lab


Ignore:
Timestamp:
Nov 17, 2009 10:43:01 AM (14 years ago)
Author:
mitty
Message:
  • update .bashrc for useful options and aliases
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.bashrc

    r25 r28  
    9292    . /etc/bash_completion 
    9393fi 
     94 
     95umask 022   # create new file with '644' 
     96ulimit -c 0 # no dump core 
     97export PAGER=less 
     98export LESS='-X -i -P ?f%f:(stdin).  ?lb%lb?L/%L..  [?eEOF:?pb%pb\%..]' 
     99 
     100HISTSIZE=50000 
     101HISTFILESIZE=50000 
     102 
     103set -o notify   # notify end of background job immediately 
     104 
     105shopt -s histappend     # append command history instead of overwrite 
     106shopt -s checkhash      # check always PATH hash table 
     107shopt -s cmdhist        # save multi lines command to one line 
     108shopt -s no_empty_cmd_completion    # no complementation with no input 
     109shopt -s histverify     # check command history before execute 
     110 
     111 
     112# view last 30 history or search from last 1000 history 
     113function i { 
     114    if [ "$1" ]; then history 1000 | grep "$@"; else history 30; fi 
     115} 
     116 
     117# view last 30 history or search from all history 
     118function I { 
     119    if [ "$1" ]; then history | grep "$@"; else history 30; fi 
     120} 
     121 
     122alias vi='vim' 
     123alias sudo='sudo -H ' 
Note: See TracChangeset for help on using the changeset viewer.