Skip to content

Complex shell commands with nested quotes and variables fail #49

@konard

Description

@konard

🐛 Bug Description

Complex shell commands with nested quotes, variables, and command substitution fail when using command-stream due to multiple layers of escaping conflicts.

🔴 Impact

  • Can't run sophisticated shell scripts
  • Pipeline commands with multiple stages fail
  • Advanced shell features are unusable

📝 Problem Example

```javascript
// Complex command with nested structures
const cmd = 'for file in *.js; do echo "Processing: $file"; done';
// ❌ Fails due to nested quotes and variables
await $`bash -c "${cmd}"`;
```

🔧 Challenge

Shell commands often require:

  • Nested quotes (single within double)
  • Variable expansion at different times
  • Command substitution
  • Complex escaping rules

All of which conflict when passed through command-stream.

🔗 References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions