Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliesup-voted.tooltip
If you need to switch between directories faster, then I want to recommend zsh-z plugin – a command-line tool that allows you to jump quickly to directories that you have visited frequently in the past or recently.
As for the problem with $($1), I think it is an artificial problem in general. You already exported your project paths as environment variables (with export dir1="..."), so use them appropriately (e.g., showdir $1). You will get zsh's autocomplete for free for environment variables and can always type showdir $ then press TAB to see all the projects you have.
Also, a small recommendation, do not mess up with PWD within scripts and try to avoid direct cd commands. pushd/popd are better and more flexible.