Commit 44ccf1e4 authored by Mark Olesen's avatar Mark Olesen
Browse files

CONFIG: adjust aliases to use project-dir directly

- reduces some reliance on env variables
parent 84d7141e
......@@ -6,11 +6,10 @@
# \\/ M anipulation |
#------------------------------------------------------------------------------
# Copyright (C) 2011-2016 OpenFOAM Foundation
# Copyright (C) 2017-2018 OpenCFD Ltd.
# Copyright (C) 2017-2020 OpenCFD Ltd.
#------------------------------------------------------------------------------
# License
# This file is part of OpenFOAM, licensed under GNU General Public License
# <http://www.gnu.org/licenses/>.
# This file is part of OpenFOAM, distributed under GPL-3.0-or-later.
#
# File
# etc/config.csh/aliases
......@@ -38,13 +37,13 @@ alias wmUnset 'source $WM_PROJECT_DIR/etc/config.csh/unset'
# ~~~~~~~~~~~~~~~~~~~~~~~~
alias foam 'cd $WM_PROJECT_DIR'
alias src 'cd $FOAM_SRC'
alias src 'cd $WM_PROJECT_DIR/src'
alias lib 'cd $FOAM_LIBBIN'
alias app 'cd $FOAM_APP'
alias sol 'cd $FOAM_SOLVERS'
alias util 'cd $FOAM_UTILITIES'
alias tut 'cd $FOAM_TUTORIALS'
alias run 'cd $FOAM_RUN'
alias app 'cd $WM_PROJECT_DIR/applications'
alias sol 'cd $WM_PROJECT_DIR/applications/solvers'
alias util 'cd $WM_PROJECT_DIR/applications/utilities'
alias tut 'cd $WM_PROJECT_DIR/tutorials'
alias run 'cd $WM_PROJECT_USER_DIR/run'
alias ufoam 'cd $WM_PROJECT_USER_DIR'
alias uapp 'cd $WM_PROJECT_USER_DIR/applications'
......
......@@ -22,7 +22,7 @@
# Change compiled version aliases
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
alias wmSet='. $WM_PROJECT_DIR/etc/bashrc'
alias wmSet='. ${WM_PROJECT_DIR:?}/etc/bashrc'
alias wmInt32='wmSet WM_LABEL_SIZE=32'
alias wmInt64='wmSet WM_LABEL_SIZE=64'
alias wmDP='wmSet WM_PRECISION_OPTION=DP'
......@@ -30,24 +30,24 @@ alias wmSP='wmSet WM_PRECISION_OPTION=SP'
alias wmSPDP='wmSet WM_PRECISION_OPTION=SPDP'
# Clear env
alias wmUnset='. $WM_PROJECT_DIR/etc/config.sh/unset'
alias wmUnset='. ${WM_PROJECT_DIR:?}/etc/config.sh/unset'
# Change directory aliases
# ~~~~~~~~~~~~~~~~~~~~~~~~
alias foam='cd $WM_PROJECT_DIR'
alias src='cd $FOAM_SRC'
alias lib='cd $FOAM_LIBBIN'
alias app='cd $FOAM_APP'
alias sol='cd $FOAM_SOLVERS'
alias util='cd $FOAM_UTILITIES'
alias tut='cd $FOAM_TUTORIALS'
alias run='cd $FOAM_RUN'
alias ufoam='cd $WM_PROJECT_USER_DIR'
alias uapp='cd $WM_PROJECT_USER_DIR/applications'
alias usol='cd $WM_PROJECT_USER_DIR/applications/solvers'
alias uutil='cd $WM_PROJECT_USER_DIR/applications/utilities'
alias foam='cd ${WM_PROJECT_DIR:?}'
alias src='cd ${WM_PROJECT_DIR:?}/src'
alias lib='cd ${FOAM_LIBBIN:?}'
alias app='cd ${WM_PROJECT_DIR:?}/applications'
alias sol='cd ${WM_PROJECT_DIR:?}/applications/solvers'
alias util='cd ${WM_PROJECT_DIR:?}/applications/utilities'
alias tut='cd ${FOAM_TUTORIALS:-${WM_PROJECT_DIR:?}/tutorials}'
alias run='cd ${FOAM_RUN:-${WM_PROJECT_USER_DIR:?}/run}'
alias ufoam='cd ${WM_PROJECT_USER_DIR:?}'
alias uapp='cd ${WM_PROJECT_USER_DIR:?}/applications'
alias usol='cd ${WM_PROJECT_USER_DIR:?}/applications/solvers'
alias uutil='cd ${WM_PROJECT_USER_DIR:?}/applications/utilities'
# Refresh the environment
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment