After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 699663 - external tools: Run Command should accept shell quoting
external tools: Run Command should accept shell quoting
Status: RESOLVED FIXED
Product: gedit-plugins
Classification: Other
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: Gedit maintainers
Gedit maintainers
Depends on:
Blocks:
 
 
Reported: 2013-05-04 09:42 UTC by Adam Dingle
Modified: 2019-03-23 20:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
fix (885 bytes, patch)
2013-05-05 15:24 UTC, Adam Dingle
accepted-commit_now Details | Review

Description Adam Dingle 2013-05-04 09:42:36 UTC
The External Tools plugin comes with a built-in Run Command tool.  Suppose I want to use this tool to perform this task:

$ sed 's/a/ /'

If I invoke Run Command, and type this into the dialog box:

sed 's/a/ /'

then I get this error:

sed: -e expression #1, char 1: unknown command: `''

The problem is that the single quote is being passed literally to sed.

The user may need to use quotes to construct arguments which contain spaces in situations like this.  So we should use a shell to interpret the command to be run.
Comment 1 Adam Dingle 2013-05-05 15:24:22 UTC
Created attachment 243336 [details] [review]
fix

Here's a fix.
Comment 2 Ignacio Casal Quinteiro (nacho) 2013-05-05 16:22:02 UTC
Review of attachment 243336 [details] [review]:

Looks good.