From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8833 invoked from network); 1 Aug 2001 10:31:21 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 1 Aug 2001 10:31:21 -0000 Received: (qmail 24426 invoked by alias); 1 Aug 2001 10:30:27 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4080 Received: (qmail 24369 invoked from network); 1 Aug 2001 10:30:25 -0000 From: martin.ebourne@arcordia.com Subject: RE: FPATH being reset after .zshenv To: Borsenkow Andrej Cc: zsh-users@sunsite.dk Date: Wed, 1 Aug 2001 11:19:10 +0100 Message-ID: X-MIMETrack: Serialize by Router on LON-ARCMTA-01/ARCORDIA(Release 5.0.3 (Intl)|21 March 2000) at 08/01/2001 11:19:14 AM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii > Unfortunately it seems that zsh resets the fpath after executing this file > (it is empty while running the file). It does however, remember the > autoload commands, which obviously then become useless. > I cannot reproduce it. Are you sure it is not reset in any other startup file? I've looked into it some more, and found the culprit. I had the following line earlier on: typeset -U FPATH which obviously makes the parameter local as a side effect. I've changed it to -Ug now which is working fine. Having looked back at the info documentation, I suspect what confused me into leaving the -g out is the bit that says 'This flag does not affect the parameter after creation': The -g (global) flag is treated specially: it means that any resulting parameter will not be restricted to local scope. Note that this does not necessarily mean that the parameter will be global, as the flag will apply to any existing parameter (even if unset) from an enclosing function. This flag does not affect the parameter after creation, hence it has no effect when listing existing parameters, nor does the flag +g have any effect except in combination with -m (see below). Anyhow, thanks for the help. Martin.