[Pkg-mc-devel] Bug#592208: Bug#592208: Bug#592208: mc: Can't open files for edit (F4) with space in filenames

Yury V. Zaytsev yury at shurup.com
Mon Aug 9 09:47:08 UTC 2010


Hi!

On Mon, 2010-08-09 at 11:03 +0200, Michelle Konzack wrote:

> Here too...
> 
> Does quoting depend on the shell used?

Good point, I have no idea. I have bash, OP has dash. I can't test dash
though, as I am not using Debian anyways :-)

What I can observe in the source code of do_edit_at_line 

        fn = vfs_canon_and_translate (filename);
        do_execute (command, fn, EXECUTE_INTERNAL);

is that it does not appear to do any quoting explicitly.

However, it launches the process with the arguments as it has, so the
process knows that it's a file name with a space in between.

Try it out by circumventing sensible-editor: "EDITOR=mcedit mc".

I guess it's an issue with /usr/bin/mcedit-debian that we ship. It
probably should have "$@" instead of just $@. 

I'm not a big fan of this solution, but it appears that sensbile-editor
only expects one argument (that is a file name), so we can live with it.

Ideas?

Best,
 
-- 
Sincerely yours,
Yury V. Zaytsev






More information about the Pkg-mc-devel mailing list