Re: How to escape $?...

Thanks for your reply

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
Thanks, Hans Durast

apply the following, and rebuild

--- e2_utils.c-original 2006-03-25 22:54:02.000000000 -0500
+++ e2_utils.c  2006-03-25 22:59:00.000000000 -0500
@@ -1174,4 +1174,6 @@
                if (strchr (arg, '*') == NULL && strchr (arg, '?') == NULL)
                        return NULL;
+               if (g_str_has_prefix (arg, "$"))      //some shell or language 
variables can be ignored
+                       return NULL;
                path = curr_view->dir;
                name = arg;

While we're at it, are there any other special-cases that we should watch for ?



Other related posts: