source: lab.git/TipAndDoc/.bashrc @ ddb1335

Last change on this file since ddb1335 was ddb1335, checked in by Ken-ichi Mito <mitty@…>, 5 years ago

update bashrc for Arch Linux

  • remove inactive functions
  • set git command completion file for bash
  • Property mode set to 100644
File size: 1.1 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 /usr/share/git/completion/git-prompt.sh ]; then
30    source /usr/share/git/completion/git-prompt.sh
31    export PS1='\u@\h:\w$(__git_ps1)\$ '
32else
33    export PS1='\u@\h:\w\$ '
34fi
35
36alias vi='vim'
37alias sudo='sudo -H '
38alias rm='rm -v'
39alias screen='screen -U -R'
40alias mv='mv -i'
41alias cp='cp -i'
Note: See TracBrowser for help on using the repository browser.