Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15122

Re: alias problem -- conflict found

From Greg Wooledge <wooledg@eeg.ccf.org>
Newsgroups gnu.bash.bug
Subject Re: alias problem -- conflict found
Date 2019-07-10 11:54 -0400
Message-ID <mailman.848.1562774074.2688.bug-bash@gnu.org> (permalink)
References (2 earlier) <5D23C417.5060108@tlinx.org> <20190709132112.GW2450@eeg.ccf.org> <10340.1562742284@jinx.noi.kre.to> <11760.1562772554@jinx.noi.kre.to> <20190710155427.GK2450@eeg.ccf.org>

Show all headers | View raw


On Wed, Jul 10, 2019 at 10:29:14PM +0700, Robert Elz wrote:
>     From:        L A Walsh <bash@tlinx.org>
>   | Functions can't process their arguments in the current scope.
> 
> I have no idea what you're getting at there.

She wants something like Tcl's [uplevel] command, most likely.

http://www.tcl.tk/man/tcl8.6/TclCmd/uplevel.htm

Short version: evaluate a command in the caller's scope, instead of in
the function's scope.  In Tcl, you can use this (WITH EXTREME CAUTION)
to implement new commands with the semantic powers of "if" or "for".
It makes "eval" look like a toy.

Bash has nothing like this.  Bash doesn't even come CLOSE to this.
It was never designed for this.  It's a SHELL.  If she's using aliases
to try to mimic this behavior, I have nothing more to say on this topic.
Horse, beating.

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: alias problem -- conflict found Greg Wooledge <wooledg@eeg.ccf.org> - 2019-07-10 11:54 -0400

csiph-web