> The internal Geany code swallows quotes of %s.

Yes, this allows %s to contain spaces without being split into several 
arguments.

To expand, on *ix systems commands are not passed to the system as a single 
string as they are input in build or context command settings.  The system 
takes an array with each argument a separate string.  So Geany has to split the 
command into arguments, which it does using a Glib function that mimics the way 
the shell splits command strings into arguments.  So like the shell things in 
quotes are made a single argument, even if they contain spaces, and the quotes 
are removed.

But since xterm runs the command in a shell, it has to re-combine the arguments 
to pass a string to the shell as if it had been typed at the command line, and 
the shell then splits it apart again.  So as you can see there is plenty of 
scope for arguments boundaries to get mixed up.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/1801#issuecomment-372925872

Reply via email to