home/rc
Marco Rebhan c57805a926 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.
2022-11-20 14:00:09 +01:00
..
detection Merge remote-tracking branch 'krobelus/file-completion' 2022-10-19 20:23:39 +11:00
filetype Add "union" as a keyword for Rust syntax 2022-11-01 21:29:07 +00:00
tools Merge remote-tracking branch 'krobelus/fix-man-jump' 2022-10-19 20:37:19 +11:00
windowing Handle spawning iTerm and screen commands with arguments containing newlines 2022-11-20 14:00:09 +01:00