help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Is there a way to set a var above it's current scope?
Date: Sat, 18 Feb 2023 15:55:31 +0100	[thread overview]
Message-ID: <CAKc7PVCGCCxS6bhRuFa=KN=hj0-tNfzA6pFMUoQbEG=yZuoDOA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 240 bytes --]

Somewhere in the man I saw something like: if you use export you'll always
set in global scope, regardless of any local variable collision. However,
(){local q; export q=1;};print $q doesn't print 1. Is there any way of
achieving this?

[-- Attachment #2: Type: text/html, Size: 318 bytes --]

             reply	other threads:[~2023-02-18 14:56 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-18 14:55 Sebastian Gniazdowski [this message]
2023-02-18 15:29 ` Roman Perepelitsa
2023-02-18 16:17   ` Sebastian Gniazdowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAKc7PVCGCCxS6bhRuFa=KN=hj0-tNfzA6pFMUoQbEG=yZuoDOA@mail.gmail.com' \
    --to=sgniazdowski@gmail.com \
    --cc=zsh-workers@zsh.org \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox


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