* accessing full command line @ 1995-09-05 13:56 Alex Ramos 1995-09-06 9:19 ` Zefram 0 siblings, 1 reply; 3+ messages in thread From: Alex Ramos @ 1995-09-05 13:56 UTC (permalink / raw) To: zsh-users 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. Any suggestions would be appreciated.. thanks -- Alex Ramos (918) 561-6299 ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: accessing full command line 1995-09-05 13:56 accessing full command line Alex Ramos @ 1995-09-06 9:19 ` Zefram 1995-09-06 15:41 ` Alex Ramos 0 siblings, 1 reply; 3+ messages in thread From: Zefram @ 1995-09-06 9:19 UTC (permalink / raw) To: alex_ramos; +Cc: Z Shell users mailing list >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" -zefram ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: accessing full command line 1995-09-06 9:19 ` Zefram @ 1995-09-06 15:41 ` Alex Ramos 0 siblings, 0 replies; 3+ messages in thread From: Alex Ramos @ 1995-09-06 15:41 UTC (permalink / raw) To: zsh-users; +Cc: Zefram 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 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1995-09-06 15:47 UTC | newest] Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 1995-09-05 13:56 accessing full command line Alex Ramos 1995-09-06 9:19 ` Zefram 1995-09-06 15:41 ` Alex Ramos
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/zsh/ 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).