Skip to content

Commit

Permalink
fix: capture subshells as single token
Browse files Browse the repository at this point in the history
  • Loading branch information
ameddin73 committed Mar 11, 2023
1 parent f742671 commit 3abf0dc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ export async function command(prompt) {
}

function getCommandList(command) {
const regex = /"[^"]+"|\S+/g;
// Capture tokens
const regex = /\$\([^)]+\)|"[^"]+"|\S+/g;
const cmds = command.match(regex);

// Enumerate env vars
Expand Down

0 comments on commit 3abf0dc

Please sign in to comment.