Mercurial > hg > cc > cirrus_home
annotate .bashrc @ 200:d2d5763849fe
export CCC
| author | Henry S. Thompson <ht@inf.ed.ac.uk> |
|---|---|
| date | Sat, 28 Feb 2026 11:48:32 +0000 |
| parents | dfb88dee52b8 |
| children | b4486b5df065 |
| 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 | |
| 157 | 6 # Source global definitions |
|
83
8fb11e337e23
environment improvements
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
61
diff
changeset
|
7 |
| 157 | 8 if [ -f /etc/bashrc ]; then |
| 9 # This is protected against running twice... | |
| 10 . /etc/bashrc | |
|
83
8fb11e337e23
environment improvements
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
61
diff
changeset
|
11 fi |
|
8fb11e337e23
environment improvements
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
61
diff
changeset
|
12 |
| 157 | 13 . ~/.bash_extras |
| 0 | 14 |
| 157 | 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 | |
| 0 | 21 } |
| 22 | |
| 157 | 23 prompt () |
| 0 | 24 { |
| 157 | 25 savehist |
| 26 echo -ne '\033]0;'${HOSTNAME/-login/} ${PWD/$HOME/\~}'\007' | |
| 0 | 27 } |
| 28 | |
| 157 | 29 if [ "$PS1" ]; then |
| 30 PS1='\[\033[1m\]\h\[\033[0m\]<\!>: ' | |
| 31 # LD_LIBRARY_PATH=/home/dc007/dc007/hst/lib64 gdb >/dev/null 2>&1 <<EOF | |
| 32 # attach $$ | |
| 33 # call (int) unbind_variable("tt") | |
| 34 # detach | |
| 35 # quit | |
| 36 # EOF | |
| 37 USER_PROMPT_COMMAND=prompt | |
| 38 echo "Vanilla bashrc" 1>&2 | |
| 39 # don't put duplicate lines or lines starting with space in the history. | |
| 40 # See bash(1) for more options | |
| 41 # export HISTCONTROL=ignoreboth | |
| 0 | 42 |
| 157 | 43 # append to the history file, don't overwrite it |
| 44 shopt -s histappend | |
|
83
8fb11e337e23
environment improvements
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
61
diff
changeset
|
45 |
| 157 | 46 # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) |
| 47 # export HISTSIZE=3000 | |
| 48 export HISTFILESIZE=6000 | |
| 49 export HISTIGNORE='[ ]*:&:[fb]g:exit' | |
| 182 | 50 |
| 51 # fix $W -> \$W after tab completion | |
| 52 shopt -u progcomp | |
| 53 | |
| 157 | 54 fi |
| 61 | 55 |
| 170 | 56 if [ -z "$TERMINFO" ] |
| 57 then | |
| 58 export TERMINFO=/usr/share/terminfo | |
| 59 # needed to allow tmux to work | |
| 60 fi | |
| 61 | |
| 157 | 62 EDITOR=emacs |
| 63 | |
| 64 WSHARED=/work/dc007/dc007/shared | |
| 170 | 65 W=/work/dc007/dc007/hst |
| 200 | 66 CCC=/work/dc007/shared/pod12/common_crawl |
| 61 | 67 |
|
180
4cb5cc893003
add private work bin dir to PATH
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
170
diff
changeset
|
68 PATH=$PATH:$HOME/.local/bin:$HOME/bin:$W/bin:$WSHARED/bin |
| 157 | 69 |
| 200 | 70 export PATH EDITOR PS1 WSHARED W CCC USER_PROMPT_COMMAND |
| 170 | 71 export -f prompt savehist |
|
180
4cb5cc893003
add private work bin dir to PATH
Henry S. Thompson <ht@inf.ed.ac.uk>
parents:
170
diff
changeset
|
72 module load tmux |
