summaryrefslogtreecommitdiff
path: root/contrib/genrpbindings
diff options
context:
space:
mode:
authorShawn Betts <sabetts@gmail.com>2007-10-11 13:57:37 -0700
committerShawn Betts <sabetts@gmail.com>2007-10-11 13:57:37 -0700
commitc72f0811c3c6f35183e7ced8b686411f329c8671 (patch)
treebfef9d0c339f96d128cb1ce684b43ab62a176e00 /contrib/genrpbindings
parentdaa5550f2e424a88ba6de7602fab405808a2ef23 (diff)
downloadratpoison-c72f0811c3c6f35183e7ced8b686411f329c8671.zip
Properly shell-escape ratpoison commands for perl bindings.
Diffstat (limited to 'contrib/genrpbindings')
-rwxr-xr-xcontrib/genrpbindings2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/genrpbindings b/contrib/genrpbindings
index dffa99c..51a6148 100755
--- a/contrib/genrpbindings
+++ b/contrib/genrpbindings
@@ -60,7 +60,7 @@ open PYTHON, ">$PYTHON_FILE" or die "Can't create $PYTHON_FILE";
# PERL preamble
print PERL 'package Ratpoison;';
print PERL '$RATPOISON="',$RATPOISON,'";';
-print PERL 'sub command { return `$RATPOISON -c "@_"`; }';
+print PERL 'sub command { my $a = "@_"; $a =~ s/(\')/\'\\\\\'\'/g; return `$RATPOISON -c \'$a\'`; }';
# ELISP preamble
print ELISP '(defvar ratpoison-program "',$RATPOISON,'")';