source: lab.git/TipAndDoc/.bashrc @ 560dfd2

Last change on this file since 560dfd2 was 29f6915b, checked in by Ken-ichi Mito <mitty@…>, 11 years ago

bash completion script moved at Ubuntu 13.04

  • Property mode set to 100644
File size: 1.5 KB
Line 
1
2umask 022   # create new file with '644'
3ulimit -c 0 # no dump core
4export PAGER=less
5export LESS='-FRX -i -P ?f%f:(stdin).  ?lb%lb?L/%L..  [?eEOF:?pb%pb\%..]'
6
7HISTSIZE=50000
8HISTFILESIZE=50000
9
10set -o notify   # notify end of background job immediately
11
12shopt -s histappend     # append command history instead of overwrite
13shopt -s checkhash      # check always PATH hash table
14shopt -s cmdhist        # save multi lines command to one line
15shopt -s no_empty_cmd_completion    # no complementation with no input
16shopt -s histverify     # check command history before execute
17
18
19# view last 30 history or search from last 1000 history
20function i {
21    if [ "$1" ]; then history 1000 | grep "$@"; else history 30; fi
22}
23
24# view last 30 history or search from all history
25function I {
26    if [ "$1" ]; then history | grep "$@"; else history 30; fi
27}
28
29if [ -f $BASH_COMPLETION_DIR/git -o -f $BASH_COMPLETION_COMPAT_DIR/git \
30     -o -f $BASH_COMPLETION_COMPAT_DIR/git-prompt ]; then
31    export PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(__git_ps1)\$ '
32else
33    export PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
34fi
35
36if [ -d $HOME/bin -a `echo $PATH | grep -c $HOME/bin` -eq 0 ]; then
37    export PATH=$PATH:$HOME/bin
38fi
39
40function svnst {
41    svn st $@ | grep "^[^?]"
42}
43
44function hexcmp {
45    cmp -l "$@" | awk '{printf "%08X %02X %02X\n", $1-1, strtonum(0$2), strtonum(0$3)}'
46}
47
48alias vi='vim'
49alias sudo='sudo -H '
50alias rm='rm -v'
51alias screen='screen -U -R'
52alias mv='mv -i'
53alias cp='cp -i'
Note: See TracBrowser for help on using the repository browser.