Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: How to stop dir expansion in the prompt?
- X-seq: zsh-users 19325
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: How to stop dir expansion in the prompt?
- Date: Mon, 03 Nov 2014 19:43:46 -0800
- In-reply-to: <CAJQX3DyxOGy=_B4hSRcVSkea=k0V=8Am+ri4_khJ5Hwy5bMnnQ@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAJQX3DyxOGy=_B4hSRcVSkea=k0V=8Am+ri4_khJ5Hwy5bMnnQ@mail.gmail.com>
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