[MacPorts] #36682: ksh93; typeset does not localize shell variable inside function
MacPorts
noreply at macports.org
Wed Jul 1 16:08:47 PDT 2015
#36682: ksh93; typeset does not localize shell variable inside function
---------------------------+--------------------------------
Reporter: ruttenberg@… | Owner: macports-tickets@…
Type: defect | Status: new
Priority: Normal | Milestone:
Component: ports | Version: 2.1.2
Resolution: | Keywords:
Port: ksh93 |
---------------------------+--------------------------------
Comment (by ajdudman@…):
This works properly for me. Maybe there is confusion between "function f"
and "g()" style functions. The former has locally-scoped variables with
the typeset builtin, (unless invoked with the . special builtin). The
latter has shared variables. Or maybe it's expecting ksh to behave
similarly to bash. Read ksh(1) man page below the "Functions." heading.
Bash compatibility is under development, but may be tried by invoking ksh
by the linked name "bash" or "ksh -o bash". A test script and its output
are attached.
--
Ticket URL: <https://trac.macports.org/ticket/36682#comment:3>
MacPorts <https://www.macports.org/>
Ports system for OS X
More information about the macports-tickets
mailing list