using ZSH mac latest. In .zshrc I have:
export ZSH="~/.oh-my-zsh"
that directory exists:
cd ~/.oh-my-zsh
me@Imac-Retina-2 .oh-my-zsh % ls
CODE_OF_CONDUCT.md README.md lib/ oh-my-zsh.sh-SAVED themes/
CONTRIBUTING.md cache/ log/ plugins/ tools/
LICENSE.txt custom/ oh-my-zsh.sh templates/
but trying to resolve $ZSH fails:
cd ~
ls $ZSH
ls: ~/.oh-my-zsh: No such file or directory
cd $ZSH
cd: no such file or directory: ~/.oh-my-zsh
it's not related to the particular $ZSH variable. For example, I can define export PDQ="~/Downloads" and cd $PDQ fails (no such file or directory), but cd ~/Downloads works just fine.
I have NO CLUE...anyone? 🤷♂️
This seems to be only related to the filesystem, other environment vars work and resolve just fine in apps, etc...
zsh
doesn't seem to expand~
in variables. I'm sure this is a recurring problem, where did you look for solutions already?