We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 24e9861 commit 3b07903Copy full SHA for 3b07903
README.md
@@ -124,6 +124,23 @@ proc.aborted; // true
124
proc.killed; // true
125
```
126
127
+### Using with command strings
128
+
129
+If you need to continue supporting commands as strings (e.g. "command arg0 arg1"),
130
+you can use [args-tokenizer](https://github.com/TrySound/args-tokenizer),
131
+a lightweight library for parsing shell command strings into an array.
132
133
+```ts
134
+import {x} from 'tinyexec';
135
+import {tokenizeArgs} from 'args-tokenizer';
136
137
+const commandString = 'echo "Hello, World!"';
138
+const [command, ...args] = tokenize(commandString);
139
+const result = await x(command, args);
140
141
+result.stdout; // Hello, World!
142
+```
143
144
## API
145
146
Calling `x(command[, args])` returns an awaitable `Result` which has the
0 commit comments