source: lab.git/TipAndDoc/.bashrc @ 7ee0f52

trunk
Last change on this file since 7ee0f52 was 7ee0f52, checked in by mitty <mitty@…>, 11 years ago

git-svn-id: https://lab.mitty.jp/svn/lab/trunk@200 7d2118f6-f56c-43e7-95a2-4bb3031d96e7

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