zsh-users
 help / color / mirror / code / Atom feed
* [zsh 4.0.1-pre-2 bug] named directories disappear
@ 2001-04-02 14:48 Vincent Lefevre
  2001-04-02 17:01 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Vincent Lefevre @ 2001-04-02 14:48 UTC (permalink / raw)
  To: zsh-users

I use zsh 4.0.1-pre-2 on

Linux greux.loria.fr 2.2.17 #13 SMP Tue Dec 12 15:26:51 MET 2000 i686 unknown

The named directory ~out was defined, but it has disappeared:

greux:~> echo ~out                                                    <16:41:04
zsh: no such user or named directory: out

This bug occurred with a previous version several weeks or months ago.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des
Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


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

* Re: [zsh 4.0.1-pre-2 bug] named directories disappear
  2001-04-02 14:48 [zsh 4.0.1-pre-2 bug] named directories disappear Vincent Lefevre
@ 2001-04-02 17:01 ` Bart Schaefer
  2001-04-02 17:16   ` Vincent Lefevre
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Schaefer @ 2001-04-02 17:01 UTC (permalink / raw)
  To: Vincent Lefevre, zsh-users

On Apr 2,  4:48pm, Vincent Lefevre wrote:
} Subject: [zsh 4.0.1-pre-2 bug] named directories disappear
}
} The named directory ~out was defined, but it has disappeared:
} 
} greux:~> echo ~out
} zsh: no such user or named directory: out

    bug () {
        hash -d out=$HOME
        echo ~out
        local out
        out=(oops) 
        ( echo ~out )
	: Without the subshell above, this line is never reached
    }

The local variable "out" is used by _pids, so that named directory will be
stomped whenever you complete process IDs.

On the other hand, if you actually set the global variable "out":

    unbug () {
	out=$HOME
	bug
	echo ~out
    }

The named directory still gets stomped, but is automatically restored any
time you refer to it.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

* Re: [zsh 4.0.1-pre-2 bug] named directories disappear
  2001-04-02 17:01 ` Bart Schaefer
@ 2001-04-02 17:16   ` Vincent Lefevre
  2001-04-02 17:30     ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Vincent Lefevre @ 2001-04-02 17:16 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

On 02 Apr, Bart Schaefer <schaefer@candle.brasslantern.com> wrote:

> The local variable "out" is used by _pids, so that named directory will be
> stomped whenever you complete process IDs.

Yes, this was probably the problem (I remember I completed process IDs).

> On the other hand, if you actually set the global variable "out":

[snip]

> The named directory still gets stomped, but is automatically restored any
> time you refer to it.

But I use hash -d out=... from my .zshenv so that I can use it anywhere,
and in particular in an interactive shell. So, what can I do?

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> - 100%
validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des
Jeux Mathématiques et Logiques, TETRHEX, etc.
Work: CR INRIA - computer arithmetic / SPACES project at LORIA


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

* Re: [zsh 4.0.1-pre-2 bug] named directories disappear
  2001-04-02 17:16   ` Vincent Lefevre
@ 2001-04-02 17:30     ` Bart Schaefer
  0 siblings, 0 replies; 4+ messages in thread
From: Bart Schaefer @ 2001-04-02 17:30 UTC (permalink / raw)
  To: Vincent Lefevre; +Cc: zsh-users

On Apr 2,  7:16pm, Vincent Lefevre wrote:
}
} But I use hash -d out=... from my .zshenv so that I can use it anywhere,
} and in particular in an interactive shell. So, what can I do?

Until the bug gets fixed, replace the `hash -d' with:

    out=...
    : ~out

As long as you don't use $out for anything else, this should work fine.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


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

end of thread, other threads:[~2001-04-02 17:31 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-02 14:48 [zsh 4.0.1-pre-2 bug] named directories disappear Vincent Lefevre
2001-04-02 17:01 ` Bart Schaefer
2001-04-02 17:16   ` Vincent Lefevre
2001-04-02 17:30     ` Bart Schaefer

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).