scsh-users
[Top] [All Lists]

Re: ,reset resets CWD

To: scsh-news@zurich.ai.mit.edu
Subject: Re: ,reset resets CWD
From: kelsey2@s48.org (Richard Kelsey)
Date: 25 Apr 2002 07:37:47 -0700
Organization: http://groups.google.com/
sperber@informatik.uni-tuebingen.de (Michael Sperber [Mr.  Preprocessor]) wrote 
in message news:<y9lk7qxjcs1.fsf@informatik.uni-tuebingen.de>...
> >>>>> "RT" == RT Happe <rthappe@mathematik.uni-freiburg.de> writes:
> 
> RT> Scsh 0.6.2 / Linux 2.2.17 #1 Tue Sep 19 11:08:14 CEST 2000 i686 unknown
> 
> RT> Slightly strange:
> 
> RT> Welcome to scsh 0.6.1 (Combinatorial Algorithms)
> RT> Type ,? for help.
> RT> >> (cwd)
> RT> "/tmp"
> RT> >> (chdir "/tmp/ware/")
> RT> >> (cwd)
> RT> "/tmp/ware"
> RT> >> ,reset
> RT>
> RT> Top level
> RT> >> (cwd)
> RT> "/tmp"
> RT> >
> 
> Actually, by going to a different command level and back, you're
> implicitly starting a new thread, and, as the CWD is thread-local, you
> get the default value back.

It's the ,reset which kills the original thread and gives you a new
one.  Pushing another level and then proceeding with the previous one
will leave you in the same thread (in Scheme 48 at least; I assume
that this is true in Scsh).  For example, the following will leave you
back in the same thread, presumably with the same working directory:

  > foo

  Error: undefined variable
         foo
         (package user)
  1> ,proceed 'foo
  'foo
  > 
                                         -Richard Kelsey

<Prev in Thread] Current Thread [Next in Thread>