[Github-comments] [geany] Keybindings for custom commands 4-9 and support for passing the document file name as an argument (#792)

Colomban Wendling notifications at xxxxx
Wed Feb 17 16:22:16 UTC 2016


Nice-ish, but as usual with placeholders like this in commands, it is subject to unexpected behavior if it expands to something with control characters -- as the command is then parsed by some other logic.  We already have this problem with almost every placeholder, but maybe it'd be worth not adding new ones…
Here maybe it can be as simple as `g_shell_escape()` as we don't implicitly run in a shell but parse with `g_shell_parse_argv()` (on *NIX only?).  Yet it can cause other issues if the user uses `sh -c "..."`, but at least it'd be consistent from the start, we wouldn't break existing commands further.

BTW, this might (unlikely) break existing custom commands if they contain a bare `%s`.  There should be a way to easily enter bare `%s`.  On *NIX, using `%''s` would be fine, not sure if it'd work on Windows, someone would have to check (at least the code path).

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/792#issuecomment-185281231
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160217/e8b07c15/attachment.html>


More information about the Github-comments mailing list