view .bashrc @ 243:7bef91ca3d51

make into a library, entry point def unpackz(infileName, callback, outfile = None), moved to python/lib/cc
author Henry S. Thompson <ht@inf.ed.ac.uk>
date Wed, 02 Oct 2024 19:54:45 +0100
parents 567ba6010658
children
line wrap: on
line source

# .bashrc

# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=

# Login for singularity
# Source global definitions

savehist () 
{ 
    hc=$(history 1 | tr -d '\n' | cut -d ' ' -f 2);
    if [ $((hc % ${HIST_FREQ-10})) = 0 ]; then
        history -a;
    fi
}

prompt ()
{
    savehist
    echo -ne '\033]0;'${HOSTNAME/-login/} ${PWD/$HOME/w\~}'\007'
}

PATH=$PATH:$HOME/.local/bin:$HOME/bin

if [ "$PS1" ]; then
  echo "Singularity bash" 1>&2
  # don't put duplicate lines or lines starting with space in the history.
  # See bash(1) for more options
  export HISTCONTROL=ignoreboth

  # append to the history file, don't overwrite it
  shopt -s histappend

  # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
  export HISTSIZE=3000
  export HISTFILESIZE=6000
  export HISTIGNORE='[ ]*:&:[fb]g:exit'

 # fix $W -> \$W after tab completion
 shopt -u progcomp

fi


EDITOR=xemacs


# csing no longer needed, probably
#if [ -d /work/y07/shared ]
#then
#  . $HOME/.csing_init
#fi



HHOME=/home/dc007/dc007/$(whoami)

export PATH EDITOR HHOME