added quote fn to shell

This commit is contained in:
Paul Liverman III 2018-03-07 23:23:08 -08:00
parent c615ea4b1f
commit b5350afe53

View File

@ -1,3 +1,7 @@
quote = (str) ->
escaped = str\gsub "'", [['"'"']]
return "'#{escaped}'"
execute = (cmd, capture_exit_code=true) ->
local handle
if capture_exit_code
@ -14,5 +18,6 @@ execute = (cmd, capture_exit_code=true) ->
return exit_code, output
{
:quote
:execute
}