mirror of
https://github.com/lazuscripts/utility.git
synced 2024-11-16 03:14:21 +00:00
added quote fn to shell
This commit is contained in:
parent
c615ea4b1f
commit
b5350afe53
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user