zsh-users
 help / color / mirror / Atom feed
* Is it possible to disable abbreviation of named directories?
@ 2021-04-15 18:23 Rudi C
  2021-04-15 20:37 ` Daniel Shahaf
  0 siblings, 1 reply; 2+ messages in thread
From: Rudi C @ 2021-04-15 18:23 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 723 bytes --]

Per  14.7.2 Static named directories at
http://zsh.sourceforge.net/Doc/Release/Expansion.html:

When the shell prints a path (e.g. when expanding %~ in prompts or when
printing the directory stack), the path is checked to see if it has a named
directory as its prefix. If so, then the prefix portion is replaced with a ‘
~’ followed by the name of the directory. The shorter of the two ways of
referring to the directory is used, i.e. either the directory name or the
full path.


Is there a way to disable this? I like to see full paths when the shell
prints things. I want the named dirs because they are easier to type, not
because they are easier to read.

PS: I do want ~ (HOME) to be abbreviated.

[-- Attachment #2: Type: text/html, Size: 1543 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Is it possible to disable abbreviation of named directories?
  2021-04-15 18:23 Is it possible to disable abbreviation of named directories? Rudi C
@ 2021-04-15 20:37 ` Daniel Shahaf
  0 siblings, 0 replies; 2+ messages in thread
From: Daniel Shahaf @ 2021-04-15 20:37 UTC (permalink / raw)
  To: Rudi C; +Cc: zsh-users

Rudi C wrote on Thu, Apr 15, 2021 at 22:53:13 +0430:
> Per  14.7.2 Static named directories at
> http://zsh.sourceforge.net/Doc/Release/Expansion.html:
> 
> When the shell prints a path (e.g. when expanding %~ in prompts or when
> printing the directory stack), the path is checked to see if it has a named
> directory as its prefix. If so, then the prefix portion is replaced with a ‘
> ~’ followed by the name of the directory. The shorter of the two ways of
> referring to the directory is used, i.e. either the directory name or the
> full path.
> 
> 
> Is there a way to disable this? I like to see full paths when the shell
> prints things. I want the named dirs because they are easier to type, not
> because they are easier to read.

How are you hashing the directories (with «hash -d» or with
zsh_directory_name)?  How are you printing them?  E.g., for %~ in
prompts there's %/ to use instead.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-15 20:37 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-15 18:23 Is it possible to disable abbreviation of named directories? Rudi C
2021-04-15 20:37 ` Daniel Shahaf

zsh-users

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/zsh-users

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-users zsh-users/ http://inbox.vuxu.org/zsh-users \
		zsh-users@zsh.org
	public-inbox-index zsh-users

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.users


code repositories for the project(s) associated with this inbox:

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

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git