From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16769 invoked by alias); 12 May 2015 02:44:03 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20201 Received: (qmail 21032 invoked from network); 12 May 2015 02:44:02 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=7BLYPAGaWkPrsajlAr01aMP0IlXgx/FXxUaEVyD+QMI=; b=IzmO2c7IWZu8M76HbnaVBgmFVqmEUoYjq93rplaxzgCaRDtTVeS/50JCkb11nKWHpX 4bfSz0y4BhMQXQJsPkN770IjUeL9tq7yZHEMT8G3VwXjWUwY/SenGB6tFCVBsLwJoRcc WzZenG6sp/Y9QYdMlkeWTOI7T4cjFynlC8p8y+iPnTARXv0+IY3lEgo0SO7zHvQF1czZ kRMluKQDIylH9r8a1F9dlnYUaKKY2hr/ieLlt/rkcsCWP5MmSzbBrf6v3Iw31aSXjvhM YzQJsnukRQnh4IIkqxIKLxpaJ/wTwhib0KEDwcQ1VxL80JO4C5R4XySg0tboYok4imeZ Nkzw== X-Gm-Message-State: ALoCoQnezM5K/+LGkakYNuV8FXeDEtODU4snovNKZj3/Ss22ibA//xonRGPX/ayi9uhSEm6IPBEn X-Received: by 10.202.225.65 with SMTP id y62mr9732784oig.78.1431398640129; Mon, 11 May 2015 19:44:00 -0700 (PDT) From: Bart Schaefer Message-Id: <150511194356.ZM12934@torch.brasslantern.com> Date: Mon, 11 May 2015 19:43:56 -0700 In-Reply-To: Comments: In reply to Kannan Varadhan "Re: new user questions and issues" (May 11, 10:43am) References: <67F1153E-5D3C-4D29-BDD0-1BB9C71FF55A@gmail.com> <150510220246.ZM10136@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: new user questions and issues MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On May 11, 10:43am, Kannan Varadhan wrote: } } What I really desire is that the variable not be inherited by or } visible to any called functions. That's pretty much never going to work. The shell parameter space uses dynamic scoping starting from the process environment on down; a scope can explicitly replace a name from its surrounding scope, but can't conceal that name from scopes upon which it calls. In fact because shell functions can only accept arguments and can only return exit status, dynamically scoped variables are the only way to share data from a called function. (Except stdin and stdout, of course, but then you're dealing with separate processes, not merely scopes.) Yes, ksh plays some games with this by allowing a nameref to be passed as an argument.