Mercurial > hg > cc > cirrus_work
annotate .bashrc @ 377:b3ba45af45c9 plus
prep for exercise 4
| author | Henry S. Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Wed, 10 Jun 2026 19:07:01 +0100 |
| parents | 567ba6010658 |
| children | e44d214699be |
| 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 |
| 237 | 48 # csing no longer needed, probably |
| 49 #if [ -d /work/y07/shared ] | |
| 50 #then | |
| 51 # . $HOME/.csing_init | |
| 52 #fi | |
|
96
e1a05ead2b1c
try to do csing correctly on compute nodes
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
72
diff
changeset
|
53 |
|
e1a05ead2b1c
try to do csing correctly on compute nodes
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
72
diff
changeset
|
54 |
| 0 | 55 |
| 56 HHOME=/home/dc007/dc007/$(whoami) | |
| 57 | |
|
9
05820245a047
work around problem with PROMPT_COMMAND
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
7
diff
changeset
|
58 export PATH EDITOR HHOME |
