Mercurial > hg > cc > cirrus_work
annotate .bashrc @ 9:05820245a047
work around problem with PROMPT_COMMAND
author | Henry S. Thompson <ht@inf.ed.ac.uk> |
---|---|
date | Sat, 23 Jul 2022 11:50:02 +0100 |
parents | 763bf32dfb26 |
children | fd9bcd759606 |
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 | |
23 if [ "$PS1" ]; then | |
24 echo "Singularity bash" 1>&2 | |
25 # don't put duplicate lines or lines starting with space in the history. | |
26 # See bash(1) for more options | |
27 export HISTCONTROL=ignoreboth | |
28 | |
29 # append to the history file, don't overwrite it | |
30 shopt -s histappend | |
31 | |
32 # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) | |
33 export HISTSIZE=3000 | |
34 export HISTFILESIZE=6000 | |
35 export HISTIGNORE='[ ]*:&:[fb]g:exit' | |
36 fi | |
37 | |
9
05820245a047
work around problem with PROMPT_COMMAND
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
7
diff
changeset
|
38 EDITOR=xemacs |
0 | 39 |
40 PATH=$PATH:$HOME/.local/bin:$HOME/bin | |
41 | |
42 HHOME=/home/dc007/dc007/$(whoami) | |
43 | |
9
05820245a047
work around problem with PROMPT_COMMAND
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
7
diff
changeset
|
44 export PATH EDITOR HHOME |