Set complete PATH explicitly; add 'mpu' function combining mkdir -p and pushd

This commit is contained in:
2022-10-23 15:04:29 -06:00
parent fc5ff20836
commit 93f4a945c2

12
.zshrc
View File

@@ -99,7 +99,7 @@ source $ZSH/oh-my-zsh.sh
# Customize to your needs...
unsetopt AUTO_PUSHD
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/opt/X11/bin:$HOME/bin:$PATH:."
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/opt/X11/bin:$HOME/bin:."
#bindkey -e
function follow() {
@@ -110,6 +110,16 @@ function follow() {
fi
}
# MPU -- Combination of mkdir -p and pushd
function mpu() {
if [ $# -lt 1 ]; then
echo "Usage: `basename $0` <dir> -- Makes dir (and any ancestor directories) if necessary, and then pushes to it"
else
mkdir -p $1
pushd $1
fi
}
# Source per-instance customizations if they exist
if [ -e $HOME/.zcustom/zshrc ]; then
source $HOME/.zcustom/zshrc