Re: Possible problem with MC_EXT environment variables?



On Thu, Sep 13, 2012 at 8:35 PM, Paul Hartman
<paul hartman+gentoo gmail com> wrote:
Hi,

I'm using mc-4.8.5 and when I execute mc.ext on some files, while I
have multiple files selected in the panel, errors are presented such
as:

/tmp/mc-paul/mcextB1iX4l: line 9: foo.bar: command not found
/tmp/mc-paul/mcextB1iX4l: line 11: foo.bar: command not found

I checked the tmp file and line numbers mentioned and "foo.bar"
matches the second file listed in these variables on the script:

MC_EXT_SELECTED
MC_EXT_ONLYTAGGED

I have fixed it by adding quotes in exec_get_export_variables from
filemanager/ext.c like this:

g_string_append_printf (export_vars_string,
                        "%s=\"%s\"\nexport %s\n",
export_variables[i].name, text,
                        export_variables[i].name);

I don't know if that is the best solution for all use cases and
portability, but at least it prevents my bash shell from trying to
execute the selected files. Feedback from mc-devs is welcome if I am
doing it wrong. :)

Thanks,
Paul



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]