From cc0efba0bce75aaab1ead72e81470154a71ec525 Mon Sep 17 00:00:00 2001 From: James Halliday Date: Sun, 14 Apr 2013 21:34:06 -0700 Subject: [PATCH] document parse env --- readme.markdown | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/readme.markdown b/readme.markdown index 01af175..2e21a5a 100644 --- a/readme.markdown +++ b/readme.markdown @@ -60,10 +60,13 @@ var parse = require('shell-quote').parse; Return a quoted string for the array `args` suitable for using in shell commands. -## parse(cmd) +## parse(cmd, env={}) Return an array of arguments from the quoted string `cmd`. +Interpolate embedded bash-style `$VARNAME` and `${VARNAME}` variables with +the `env` object which like bash will replace undefined variables with `""`. + # install With [npm](http://npmjs.org) do: