From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id BAA15954 for ; Thu, 7 Sep 1995 01:47:37 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA28957 (5.65c/Gatech-10.0-IDA for ); Wed, 6 Sep 1995 11:45:19 -0400 Received: by math (5.x/SMI-SVR4) id AA05847; Wed, 6 Sep 1995 11:40:02 -0400 Old-Return-Path: Resent-Date: Wed, 6 Sep 1995 10:41:48 -0500 (CDT) Old-Return-Path: From: Alex Ramos Message-Id: <199509061541.AA16330@intruder.wiltel.com> Subject: Re: accessing full command line To: zsh-users@math.gatech.edu Date: Wed, 6 Sep 1995 10:41:48 -0500 (CDT) Cc: A.Main@dcs.warwick.ac.uk (Zefram) In-Reply-To: <2926.199509060919@stone.dcs.warwick.ac.uk> from "Zefram" at Sep 6, 95 10:19:53 am Reply-To: alex_ramos@wiltel.com X-Mailer: ELM [version 2.4 PL21] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-Id: <"ZIOqH2.0.4R1.C3SJm"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/65 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Zefram wrote: > > >I would like to know if there is any way (e.g. an undocumented > >feature or a source code patch) in zsh to access the full > >command line passed to a function or alias. For example, if > >'foo' is a function, and I type > > > > foo "blah blah $$" $XYZ > > > >I'd like to (inside 'foo') have access to the string '"blah blah $$" $XYZ' > >as it was typed. > > No, there's no way. But if all you want to do is inhibit globbing, you > could do > > alias foo="noglob foo" I would like to inhibit globbing as well as quote removal. (never mind that the example implies I'd like to inhibit variable interpolation too. It was a poorly chosen example). Some may ask, "and why the hell would you want to do THAT?". The reason is, I'm trying to use zsh for some "unusual" purposes. For example, I open a co-process to an interactive application and use a zsh subshell with a small set of aliases and functions to act as a gateway between the user and the application, thus providing history, completion, editing, etc and allowing a brain-dead application to be useable. (I could also use 'vared', but I was told that vared's history feature is actually a bug, so I conclude it'll be removed in the future). This is a very powerful use of zsh, which is not paralleled by any other utility I know of. (the closest thing would be Perl with a GNU Readline extension). For this I compliment the zsh developers! How hard would it be to implement setopts for "NoQuoteRemoval" and "VaredHistory"? If someone can point me in the right direction, I may be able to produce some patches for that.. thanks, -- Alex Ramos (918) 561-6299