I have a wierd problem with my zsh on my OSX 10.8 (with oh-my-zsh, which I think has AUTO_NAME_DIRS set for me).
Normally if I set up an environment variable to some path by export SOME_VAR=/some/path
, and switch to that path, I will have ~SOME_VAR
in my command line prompt. This works fine on my Ubuntu 13.04 with zsh 5.0.0.
However, on my OSX 10.8, it works only for certain variable names. For example, some logs from my terminal:
Last login: Fri Jul 26 10:22:15 on ttys000
sji@MacBook-Air:~% cd dev/test
sji@MacBook-Air:~/dev/test% export QEPY_PATH=`pwd`
sji@MacBook-Air:~/dev/test% export AEPY_PATH=`pwd`
sji@MacBook-Air:~/dev/test% export EEPY_PATH=`pwd`
sji@MacBook-Air:~/dev/test% export AAAAEPY_PATH=`pwd`
sji@MacBook-Air:~/dev/test% export AAAAEPY_PTH=`pwd`
sji@MacBook-Air:~/dev/test% export AAAAEPY_PBTH=`pwd`
sji@MacBook-Air:~/dev/test% export AAAAEPY_PDTH=`pwd`
sji@MacBook-Air:~/dev/test% export AAAAEPY_PDDH=`pwd`
sji@MacBook-Air:~/dev/test% export AAAAEPY_PDIO=`pwd`
sji@MacBook-Air:~/dev/test% export AAAAEPY_PAT=`pwd`
sji@MacBook-Air:~/dev/test% export AEPY_PAT=`pwd`
sji@MacBook-Air:~AEPY_PAT%
All but the last one didn't work for me. At first, I thought it's because the zsh on OSX is too old. But the problem still persists after I upgraded it to 5.0.2 through MacPorts.
I struggled for some time but still couldn't find the pattern that which variable names are acceptable and which are not.
Has anyone some ideas? Thanks.