zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: How to stop dir expansion in the prompt?
Date: Mon, 03 Nov 2014 19:43:46 -0800	[thread overview]
Message-ID: <141103194346.ZM32278@torch.brasslantern.com> (raw)
In-Reply-To: <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.


  reply	other threads:[~2014-11-04  3:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04  3:23 Shiyao Ma
2014-11-04  3:43 ` Bart Schaefer [this message]
2014-11-04  6:30   ` Shiyao Ma
2014-11-04  7:36     ` Bart Schaefer
2014-11-04  9:42       ` Shiyao Ma
2014-11-04 16:43         ` Bart Schaefer
2014-11-05  1:27           ` Shiyao Ma

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=141103194346.ZM32278@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).