Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: bug with chpwd/allexport
- X-seq: zsh-workers 4234
- From: mason@xxxxxxxxxxxxxxx (Geoff Wing)
- To: zsh-workers@xxxxxxxxxxxxxxx
- Subject: Re: bug with chpwd/allexport
- Date: 17 Jul 1998 10:44:21 GMT
- Organization: PrimeNet Computer Consultants
- References: <35AF27D6.7362E041@xxxxxx>
- Reply-to: mason@xxxxxxxxxxxxxxx
Dominik Vogt <dominik_vogt@xxxxxx> typed:
:# export PS1='%~>'
:~ > setopt ALLEXPORT
:~ > setopt AUTONAMEDIRS
:~ > function chpwd () {
:> FOO=$PWD
:> echo $FOO
:> }
:~ > cd /etc
:/etc
:$FOO >
^^^^ You mean "~FOO >"
:There is a simple workaround:
:function chpwd () {
: setopt LOCALOPTIONS
: unsetopt AUTONAMEDIRS
: unsetopt ALLEXPORT
: FOO=$PWD
: echo $FOO
:}
Simple workaround 1:
chpwd () {
echo $PWD
}
Simple workaround 2 (in case we're only seeing a fragment of your chpwd() ):
chpwd() {
local FOO=$PWD
echo $FOO
}
BTW, do you have a good reason for setopt'ing ALL_EXPORT? Why polute your
environment in that manner?
--
Geoff Wing <gcw@xxxxxxxxx> Mobile : 0412 162 441
Work URL: http://www.primenet.com.au/ Ego URL: http://pobox.com/~gcw/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author