Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
How to stop dir expansion in the prompt?
- X-seq: zsh-users 19324
- From: Shiyao Ma <i@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: How to stop dir expansion in the prompt?
- Date: Tue, 4 Nov 2014 11:23:41 +0800
- 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
Hi.
I am using this prompt:
PROMPT="%(?.${success_color}.${failure_color})${SSH_TTY:+[%n@%m]}%B%${max_path_chars}<...<"'${vcs_info_msg_0_%%}'"%<<%(!.${root_char}.${user_char})%b%f
"
The whole script is here: https://bpaste.net/show/52184a546984#56
If I cd to a directory like ~/.virtualenvs, the prompt will show as
~WORKON_HOME.
It's expanded to the environment variable WORKON_HOME.
I wonder, is there a option to disable the auto expansion?
If not, possible to modify the above prompt to show the real path?
Note, it's not a straightforward modification like ${PWD/#$HOME/~}
because vcs_info_msg_0 is inside and should be taken care of.
Thanks in advance.
Regards.
--
吾輩は猫である。ホームーページはhttp://introo.me。;
Messages sorted by:
Reverse Date,
Date,
Thread,
Author