summaryrefslogtreecommitdiff
path: root/lib/sh
diff options
context:
space:
mode:
authorChet Ramey <chet.ramey@case.edu>2014-04-11 11:05:05 -0400
committerChet Ramey <chet.ramey@case.edu>2014-04-11 11:05:05 -0400
commit2b76266c887cb74ce9d760d5762d2de44b82473a (patch)
tree596d276b65dd8ef9cd1c23de15f05fdeee66553c /lib/sh
parent6ebbb24a5cc6e798e3c8f75e8617908b93a37d65 (diff)
downloadbash-2b76266c887cb74ce9d760d5762d2de44b82473a.tar.gz
Bash-4.3 patch 10
Diffstat (limited to 'lib/sh')
-rw-r--r--lib/sh/shquote.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/sh/shquote.c b/lib/sh/shquote.c
index 31cce1c1..fff4f817 100644
--- a/lib/sh/shquote.c
+++ b/lib/sh/shquote.c
@@ -311,3 +311,17 @@ sh_contains_shell_metas (string)
return (0);
}
+
+int
+sh_contains_quotes (string)
+ char *string;
+{
+ char *s;
+
+ for (s = string; s && *s; s++)
+ {
+ if (*s == '\'' || *s == '"' || *s == '\\')
+ return 1;
+ }
+ return 0;
+}