Mercurial > hg > cc > cirrus_work
annotate .bashrc @ 199:341738282feb
for pub
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Mon, 04 Dec 2023 10:42:02 +0000 |
parents | 93d4915ef797 |
children | 567ba6010658 |
rev | line source |
---|---|
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 savehist () | |
10 { | |
11 hc=$(history 1 | tr -d '\n' | cut -d ' ' -f 2); | |
12 if [ $((hc % ${HIST_FREQ-10})) = 0 ]; then | |
13 history -a; | |
14 fi | |
15 } | |
16 | |
17 prompt () | |
18 { | |
19 savehist | |
20 echo -ne '\033]0;'${HOSTNAME/-login/} ${PWD/$HOME/w\~}'\007' | |
21 } | |
22 | |
72 | 23 PATH=$PATH:$HOME/.local/bin:$HOME/bin |
24 | |
0 | 25 if [ "$PS1" ]; then |
26 echo "Singularity bash" 1>&2 | |
27 # don't put duplicate lines or lines starting with space in the history. | |
28 # See bash(1) for more options | |
29 export HISTCONTROL=ignoreboth | |
30 | |
31 # append to the history file, don't overwrite it | |
32 shopt -s histappend | |
33 | |
34 # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) | |
35 export HISTSIZE=3000 | |
36 export HISTFILESIZE=6000 | |
37 export HISTIGNORE='[ ]*:&:[fb]g:exit' | |
72 | 38 |
39 # fix $W -> \$W after tab completion | |
40 shopt -u progcomp | |
41 | |
0 | 42 fi |
43 | |
96
e1a05ead2b1c
try to do csing correctly on compute nodes
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
72
diff
changeset
|
44 |
9
05820245a047
work around problem with PROMPT_COMMAND
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
7
diff
changeset
|
45 EDITOR=xemacs |
0 | 46 |
96
e1a05ead2b1c
try to do csing correctly on compute nodes
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
72
diff
changeset
|
47 |
e1a05ead2b1c
try to do csing correctly on compute nodes
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
72
diff
changeset
|
48 if [ -d /mnt/lustre/indy2lfs/sw/ ] |
e1a05ead2b1c
try to do csing correctly on compute nodes
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
72
diff
changeset
|
49 then |
98 | 50 . $HOME/.csing_init |
96
e1a05ead2b1c
try to do csing correctly on compute nodes
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
72
diff
changeset
|
51 fi |
e1a05ead2b1c
try to do csing correctly on compute nodes
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
72
diff
changeset
|
52 |
e1a05ead2b1c
try to do csing correctly on compute nodes
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
72
diff
changeset
|
53 |
0 | 54 |
55 HHOME=/home/dc007/dc007/$(whoami) | |
56 | |
9
05820245a047
work around problem with PROMPT_COMMAND
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
7
diff
changeset
|
57 export PATH EDITOR HHOME |