Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
Handle more shell metacharacters in editor names
[gitweb.git]
/
editor.c
diff --git
a/editor.c
b/editor.c
index 4d469d076bcd58df3af16d98adc9120e34765944..941c0b2ab6deeaaaa346256b7c8080fd67c996b2 100644
(file)
--- a/
editor.c
+++ b/
editor.c
@@
-28,7
+28,7
@@
int launch_editor(const char *path, struct strbuf *buffer, const char *const *en
const char *args[6];
struct strbuf arg0 = STRBUF_INIT;
- if (strcspn(editor, "
$ \t'
") != len) {
+ if (strcspn(editor, "
|&;<>()$`\\\"' \t\n*?[#~=%
") != len) {
/* there are specials */
strbuf_addf(&arg0, "%s \"$@\"", editor);
args[i++] = "sh";