On Sun, Oct 07, 2018 at 07:47:46PM +0200, Klemens Nanni wrote:
> On Sun, Oct 07, 2018 at 07:30:15PM +0200, Tomasz Rola wrote:
> > Another trick may be executing the line with echo prepended - should
> > do all expansions and write what will be executed. I think it is not
> > going to work too well if for loop is being echoed, and other such
> > things, so perhaps quoting a command and echoing would do the job.
> This will break any non-trivial construct including pipes, command lists,
> loops, (nested) quoting, et al.

And let's not forget about redirections - any writing/appending inside
expansion will make echoing it even more non-trivial.

However, the same can be said about M-C-e in command prompt - how is
the shell going to know it should not expand this particular part,
because it calls a script which appends to / deletes from database?
And lets say it deletes not quite what we want? Because we are
prototyping on live command.

Which makes me say again, if this is such nontrivial, then I choose
writing a script.

-- 
Regards,
Tomasz Rola

--
** A C programmer asked whether computer had Buddha's nature.      **
** As the answer, master did "rm -rif" on the programmer's home    **
** directory. And then the C programmer became enlightened...      **
**                                                                 **
** Tomasz Rola          mailto:tomasz_r...@bigfoot.com             **

Reply via email to