Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: How to stop dir expansion in the prompt?



On Nov 4, 11:23am, Shiyao Ma wrote:
}
} If I cd to a directory like ~/.virtualenvs, the prompt will show as
} ~WORKON_HOME.
} 
} I wonder, is there a option to disable the auto expansion?

That expansion is the %~ prompt replacement, so one way to avoid this
is to change

    zstyle ':vcs_info:*' nvcsformats "%~" ""

to

    zstyle ':vcs_info:*' nvcsformats "%2d" ""

or similar.

If this is unsatisfactory, you should

    unsetopt AUTO_NAME_DIRS

and possibly also

    unsetopt CDABLE_VARS

unless you are actually using those features.  There's no way to disable
the action of %~ on named directories once a named directory entry is
created.



Messages sorted by: Reverse Date, Date, Thread, Author