Re: How to escape $?...
- From: tpgww@xxxxxxxxxxx
- To: emelfm2@xxxxxxxxxxxxx
- Date: Sun, 26 Mar 2006 10:57:57 -0500
On Sat, 25 Mar 2006 19:05:36 +0100
Hans Durast <65644434343@xxxxxxxxx> wrote:
> >Someone proposed that escape chars be filtered from commands. I guess
> >that needs more thought.
> >
> >
> Oh yes, please think about this "feature".
> One of the greatest things in emelfm2 is to put
> my own shell commands into a menu, or create
> a new button for it.
> But if some commands have no function...
>
> I have applied your patch, but the result is not
> what I want.
> I have tested it with this command line:
>
> |Xdialog --yesno "the\\nresult" 7 0; echo $?
>
> with some variations,
> but the result is neither 0 nor 1, it is nothing or '$?'
> I think i go back to version 0.1.5
That won't help, for your test-case. emelFM2's command processor is not a
full-blown shell, it doesn't know about things like $?.
To get access to shell parameters like $?, you need to run
sh -c "Xdialog --yesno "the\\nresult" 7 0; echo $?"
(which runs as expected after applying the patch from last message).
BTW, if you want to prevent the "\" stripping in 0.1.6, remove lines 960 to 978
from
.../src/command/e2_command.c
Regards
Tom
--
Users can unsubscribe from the list by sending email to
emelfm2-request@xxxxxxxxxxxxx with 'unsubscribe' in the subject field or by
logging into the web interface.
- Follow-Ups:
- Re: How to escape $?...
- From: Hans Durast
- References:
- How to escape $?...
- From: Hans Durast
- Re: How to escape $?...
- From: tpgww
- Re: How to escape $?...
- From: Hans Durast
Other related posts:
- » How to escape $?...
- » Re: How to escape $?...
- » Re: How to escape $?...
- » Re: How to escape $?...
- » Re: How to escape $?...
- Re: How to escape $?...
- From: Hans Durast
- How to escape $?...
- From: Hans Durast
- Re: How to escape $?...
- From: tpgww
- Re: How to escape $?...
- From: Hans Durast