diff --git a/on_site/bash_aliases b/on_site/bash_aliases index de94e95..fdda64c 100644 --- a/on_site/bash_aliases +++ b/on_site/bash_aliases @@ -11,7 +11,7 @@ alias ls='ls --color' alias l='ls' # "ll" is short for detailed file lists, with "ls -l": -alias ll='ls -al' +alias ll='ls -lh' # "lh" is short for detailed file lists with human-readable units: alias lh='ls -Alh' @@ -48,6 +48,13 @@ alias cdnewest='cd `ls -td --color=never */ | head -1`' # This shortcut ``psb`` will allow you to quickly go to that host while # retaining your current working directory. alias psb='sshcd psbuild-rhel7' +alias psb5='sshcd psbuild-rhel5' +alias psd='sshcd psdev' +alias xppc='ssh -X xppopr@xpp-control' +alias xppd='ssh -X xppopr@xpp-daq' +alias mfxd='ssh -X mfxopr@mfx-daq' +#alias tos3df='ssh -J espov@s3dflogin.slac.stanford.edu psana' +alias tos3df='ssh espov@s3dflogin.slac.stanford.edu' # ***************************** # ** Python and hutch-python ** @@ -63,6 +70,19 @@ alias mfx3="hpy3 mfx" alias cxi3="hpy3 cxi" alias mec3="hpy3 mec" +# Dir shrortcuts +alias anad='cd /cds/data/psdm/' +alias ffbd='cd /cds/data/drpsrcf/' +alias hpyd='cd /cds/group/pcds/pyps/apps/hutch-python/' +alias mydev='cd /cds/group/pcds/epics-dev/espov' +alias epd='cd /cds/group/pcds/epics/' +alias daqd='cd /cds/group/pcds/dist/pds' +alias daqlogs='/cds/group/pcds/pds/' +alias screens='cd /cds/group/pcds/epics-dev/screens/' +alias iocd='cd /cds/group/pcds/epics/ioc/' +alias smd_release='cd /cds/group/psdm/sw/tools/smalldata_tools' + + # Python 3 hutch python shortcuts # hpy3 # Quickly start a hutch-python session for a given hutch with ``hpy3 (hutchname)`` @@ -100,3 +120,28 @@ alias cagetstring='caget -S' # The tool shellcheck is available in our pcds Python environment. # # For bash help, see https://tldp.org/LDP/Bash-Beginners-Guide/html/ + +# file alias +alias xppcnf='vim /cds/group/pcds/dist/pds/xpp/scripts/xpp.cnf' +alias mfxcnf='vim /cds/group/pcds/dist/pds/mfx/scripts/mfx.cnf' +alias cxicnf='vim /cds/group/pcds/dist/pds/cxi/scripts/cxi_0.cnf' + +# plg prog rdesktop +#alias plcprog='rdesktop -g 1920x1200 -u ${USER} plcprog-console' +alias plcprog='xfreerdp -g 1920x1200 -u ${USER} plcprog-console' +alias plcprog4k='rdesktop -g 3600x2000 -u ${USER} plcprog-console' + +# Env aliases +alias pcdsconda='source pcds_conda' +alias anaenvpy2='source /reg/g/psdm/etc/psconda.sh' +alias anaenv='source /reg/g/psdm/etc/psconda.sh -py3' +alias xppenv='source /cds/group/pcds/pyps/apps/hutch-python/xpp/xppenv' +alias myconda='source /cds/home/e/espov/miniconda3/etc/profile.d/conda.sh' +alias ami2env='source /cds/group/pcds/dist/pds/ami2-devel/setup_env_lcls1.sh' + +# Path alias +alias add_pwd_to_python='export PYTHONPATH=$PWD' + +# Custom commands aliases +alias myiftop='sudo iftop -m 1G' +alias swtool='/cds/group/pcds/pyps/apps/switchtool/latest/switchtool' diff --git a/on_site/bash_functions b/on_site/bash_functions index 7fc1ce3..1834438 100644 --- a/on_site/bash_functions +++ b/on_site/bash_functions @@ -334,3 +334,9 @@ helpme() { # The tool shellcheck is available in our pcds Python environment. # # For bash help, see https://tldp.org/LDP/Bash-Beginners-Guide/html/ + +function pvgrep() +{ +grep $1 /reg/d/iocData/*/iocInfo/IOC.pvlist +} + diff --git a/on_site/bashrc b/on_site/bashrc index 5378fb2..40a128d 100644 --- a/on_site/bashrc +++ b/on_site/bashrc @@ -18,7 +18,7 @@ if [ -z "$dotfiles" ]; then fi # The following sets up your prompt to show at least the host -export PS1='\[\e[0;31m\][\u@\h \W]\$\[\e[m\] ' +export PS1='\[\e[0;32m\][\u@\h \W]\$\[\e[m\] ' export PROMPT_COMMAND='echo -ne "\033]0;${USER}@${HOSTNAME%%.*}:${PWD/#$HOME/~}\007"' # Your default editor will be set to vim. @@ -102,6 +102,20 @@ source /cds/group/pcds/setup/plcenv.sh # Or read-write-execute for you and your group, and just read-execute for all # others. +export PATH=$PATH:/cds/home/e/espov/bin + +if [ $(echo $HOSTNAME | grep -ic -e "psana" -e "mon0" -e "drp-srcf") -eq 1 ] +then + source /reg/g/psdm/etc/psconda.sh -py3 &> /dev/null +elif [ $(echo $HOSTNAME | grep -ic -e "xpp") -eq 1 ] +then + export PATH=$PATH:/cds/home/opr/xppopr/bin +elif [ $(echo $HOSTNAME | grep -ic -e "mfx") -eq 1 ] +then + export PATH=$PATH:/cds/home/opr/mfxopr/bin +fi + + # ******************** # ** Tab completion ** # ******************** @@ -236,7 +250,7 @@ pathmunge /cds/sw/tools/bin # - digiconfig # - psipmi -pathmunge /reg/g/pcds/engineering_tools/latest-released/scripts +pathmunge /cds/group/pcds/engineering_tools/latest-released/scripts # /reg/g/pcds/engineering_tools/latest-released/scripts # * General tools of use to ECS engineers # For documentation, see: https://github.com/pcdshub/engineering_tools @@ -340,7 +354,8 @@ if [ -n "${THIS_HOST}" ]; then fi fi -# clean up the /reg/common/tools/bin as it is causing issues with netconfig + +# clean up tools path. It should be /cds/sw/tools/bin (added above) pathpurge /reg/common/tools/bin # *************** diff --git a/vimrc b/vimrc index f0d3b28..319273e 100644 --- a/vimrc +++ b/vimrc @@ -28,7 +28,7 @@ set ignorecase smartcase " case-insensitive (ic) search by default " except: if you search for AStringLikeThis, it will be case sensitive set imdisable " Disable the IME (gvim and unicode don't play well on different locale) set incsearch " do incremental searching -set mouse+=a " enable mouse mode (terminal dependent) +" set mouse+=a " enable mouse mode (terminal dependent) commented: messes with copy in mobaXterm set nobackup " disable writing .bak set novb " ** visual bell, no beeping! ** set number " line numbering @@ -46,10 +46,10 @@ set wrap " wrap text at the end of your screen (-> set wildignore+=*/tmp/*,*.so,*.swp,*.zip set wildignore+=*\\tmp\\*,*.exe -if has('termguicolors') - " Depending on your terminal, you might get 24-bit color support - set termguicolors -endif +"if has('termguicolors') +" " Depending on your terminal, you might get 24-bit color support +" set termguicolors +"endif if !has('nvim') && &term =~ '^screen' " tmux knows the extended mouse mode