Lowercase dirnames in pd to avoid env variables

This is not foolproof, but most critical environment variables are all
uppercase, so lowercase variables will be mostly safe.
This commit is contained in:
Peter J. Holzer 2018-02-07 09:25:24 +01:00
parent 3404e96cfb
commit 2a304fdfdf
1 changed files with 1 additions and 1 deletions

2
.zshrc
View File

@ -44,7 +44,7 @@ pd(){
else else
pushd "$@" pushd "$@"
fi fi
namedir $(echo $(basename "$PWD" | tr -cd 'A-Za-z0-9_') | sed -e 's/^[0-9]/_&/') namedir $(echo $(basename "$PWD" | tr -cd 'A-Za-z0-9_') | tr 'A-Z' 'a-z' | sed -e 's/^[0-9]/_&/')
echo "$PWD" echo "$PWD"
} }