Metadata-Version: 2.4
Name: minimindslab-shell-quote
Version: 0.1.0
Summary: Deterministically escape and unescape POSIX shell arguments and command lines for offline text processing.
Author: MiniMindsLab
License: MIT
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# MiniMindsLab Shell Quote

Deterministically escape and unescape POSIX shell arguments and command lines for offline text processing.

## Features

- `quote(text) -> str`: quote a single token for POSIX shell safety.
- `unquote(text) -> str`: parse one shell token and return its unescaped content.
- `join(tokens) -> str`: build a command line from token list.
- `split(command_line) -> list[str]`: split a command line into POSIX-like tokens.

All functionality is implemented with Python standard library only.

## Example

```python
from minimindslab_shell_quote import quote, join, split, unquote

assert quote("a b") == "'a b'"
assert quote("simple") == "simple"

tokens = ["a", "b c", "d'e"]
cmd = join(tokens)
assert split(cmd) == tokens

assert unquote("'hello world'") == "hello world"
```
