summaryrefslogtreecommitdiff
path: root/src/input_handler.cc
diff options
context:
space:
mode:
authorMarco Rebhan <me@dblsaiko.net>2022-11-20 02:13:34 +0100
committerMarco Rebhan <me@dblsaiko.net>2022-11-20 14:00:09 +0100
commitc57805a926baba9012c3e5dac659900ffb7f1a5a (patch)
treef1ea8c1b675cbd056785548c0f1ffd530226c5a9 /src/input_handler.cc
parentdf12bc8dbd5ca1b59dcb93815bb374844734b198 (diff)
Handle spawning iTerm and screen commands with arguments containing newlines
Before, sed would add quotes to every line of the single multiline argument, causing the final quoted argument to "split ... command" or screen to contain unquoted newlines such as this (from kakoune-cr): tell application "iTerm" tell current session of current window tell (split vertically with same profile command "env PATH='...' 'sh' '-c' '' ' export KAKOUNE_SESSION=$1' ' export KAKOUNE_CLIENT=$2' ' shift 3' '' ' [ $# = 0 ] && set \"$SHELL\"' '' ' \"sh\"' ' ' '--' '51909' 'client0' 'terminal' ") to select end tell end tell Instead of using sed to do this which operates on single lines at a time, simply use printf to insert ' quotes before and after the entire argument.
Diffstat (limited to 'src/input_handler.cc')
0 files changed, 0 insertions, 0 deletions