Is there a way I can get the pwd
in an alias
in my .zshrc
file? I'm trying to do something like the following:
alias cleanup="rm -Rf `pwd`/{foo,bar,baz}"
This worked fine in bash; pwd
is always the directory I've cd
'd into, however in zsh it seems that it's evaluated when the .zshrc
file is first loaded and always stays as my home directory. I've tested using with a really simple alias
setup, but it never changes.
How can I have this change, so that calling the alias
from a subdirectory always evaluates as that subdir?
EDIT: not sure if this will help, but I'm using zsh via oh-my-zsh on the mac.
function pwdtestf(){echo
pwd}
appears to work?