

Within single quoted strings, they remain as the text $KMVAR_SafariURL (unchanged). This will not work because bash only expands variables within double-quoted strings. Snippet.bash emacsclient -e '(w3m-browse-url "$KMVAR_SafariURL")' For example, perhaps you want a command like this: Now a further complication happens when you want to send a string containing double quotes and variables to a parameter. Snippet.bash defaults write "/Users/me/Library/Application Support/Witch/Settings" " $KMVAR_Setting" - " $KMVAR_Type" " $KMVAR_Value" So instead, perhaps set one variable to the setting name, and one variable to the type and one variable to the value, and then use a command like this: So variables that are meant to be a single parameter should be surrounded by double quotes in the line, but not contain quotes in the variable, and generally you do not want to pass multiple parameters within a single parameter. So the problem is that the word-breaking, variable substitution, de-quoting and de-backslash is all happening at as the line is processed by bash, after which you are left with quotes from within variable substitution, but they no longer have any meaning, they are just characters. It is bash that has processed the variable substitution for $KMVAR_witchPref, split the line in to seven parts, processed the backslash in “Application\ Support” and then executed the defaults tool with the seven parts as arguments (the command itself is the 0th argument, normally mostly ignored by tools). The text typed in the most recently executed Paste by Name action The text typed in the most recently executed Prompt With List action The window ID of the most recently displayed Keyboard Maestro Engine window The success or failure of the immediate past action

The value associated with how the parent macro was triggered The trigger description of the trigger that started the parent macro The type of the trigger that started the parent macro The unixtime the parent macro started executing The UUID of the macro group containing the executing macro The name of the macro group containing the executing macro The UUID of the macro group containing the parent executing macro The name of the macro group containing the parent executing macro
