0
|
1 # .bashrc
|
|
2
|
|
3 # Uncomment the following line if you don't like systemctl's auto-paging feature:
|
|
4 # export SYSTEMD_PAGER=
|
|
5
|
|
6 # Login for singularity
|
|
7 # Source global definitions
|
|
8
|
|
9 if [ -f /etc/bashrc ]; then
|
|
10 # This is protected against running twice...
|
|
11 . /etc/bashrc
|
|
12 fi
|
|
13
|
|
14
|
|
15 savehist ()
|
|
16 {
|
|
17 hc=$(history 1 | tr -d '\n' | cut -d ' ' -f 2);
|
|
18 if [ $((hc % ${HIST_FREQ-10})) = 0 ]; then
|
|
19 history -a;
|
|
20 fi
|
|
21 }
|
|
22
|
|
23 prompt ()
|
|
24 {
|
|
25 savehist
|
|
26 echo -ne '\033]0;'${HOSTNAME/-login/} ${PWD/$HOME/w\~}'\007'
|
|
27 }
|
|
28
|
|
29 if [ "$PS1" ]; then
|
|
30 echo "Singularity bash" 1>&2
|
|
31 # don't put duplicate lines or lines starting with space in the history.
|
|
32 # See bash(1) for more options
|
|
33 export HISTCONTROL=ignoreboth
|
|
34
|
|
35 # append to the history file, don't overwrite it
|
|
36 shopt -s histappend
|
|
37
|
|
38 # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
|
39 export HISTSIZE=3000
|
|
40 export HISTFILESIZE=6000
|
|
41 export HISTIGNORE='[ ]*:&:[fb]g:exit'
|
|
42 fi
|
|
43
|
|
44 #export PYTHONPATH=$HOME/lib/python3.6/site-packages
|
|
45
|
|
46 EDITOR=emacs
|
|
47
|
|
48 PATH=$PATH:$HOME/.local/bin:$HOME/bin
|
|
49
|
|
50 HHOME=/home/dc007/dc007/$(whoami)
|
|
51
|
|
52 export PATH EDITOR HHOME
|