Commit graph

13 commits

Author SHA1 Message Date
4f4e97475b
[ruby] Modernize Ruby shell parsing and expansion, add C compat test mode (#4)
Replace Ruby's old wordexp-like command splitting with a tokenizer and
parser that understands ; and && while honoring quotes and nesting.

Implement richer expansions for command substitution, arithmetic,
parameter defaults (${var:-...}), brace expansion, and escaped
dollar/backtick behavior via shared quote-state handling.

Expand the test suite with parser/expansion edge cases, escaping
parity checks, builtin usage validation, and job-control refresh tests.

Keep C green by adding a compat test profile for c/Makefile test and
by returning nonzero on builtin failures in -c mode, including clearer
`bg` usage output.
2026-02-07 15:18:41 -08:00
79ba26c76b
Ditch wordexp and modify Shellwords code to make it work 2026-01-02 15:47:09 -08:00
bec3f4a1f3
Add guard gem 2026-01-02 14:50:38 -08:00
f9e7dfe144
Add x86_64-linux to Gemfile.lock platforms 2026-01-02 12:52:27 -08:00
f72ddf7f32
Update to Ruby 4, update gems, s/rubocop/standard/ 2026-01-02 12:40:38 -08:00
71a7c7d6ed
Update to wordexp 0.2.2 2026-01-02 12:39:52 -08:00
03fc5c512f Update to Ruby 3.2.2 and wordexp 0.2.0 2023-10-05 14:48:38 -07:00
996feaf62c
Update gems and add .ruby-version 2023-02-13 23:26:44 -08:00
b4a1f28a11
Fix tests and add rake task 2022-01-21 20:26:05 -08:00
34150d64cb Extract job control to a separate class 2022-01-17 18:54:52 -08:00
ae89630e69
Add rubocop 2022-01-17 00:44:50 -08:00
0d0bb73114
Use wordexp to support super fancy expansions
- Expands environment variables, e.g. $HOME -> /home/tina

- Expands tildes, e.g. ~/bin -> /home/queso/bin

- Performs command substitution, e.g. `date +%F` -> 2022-01-16
                                  or $(date +%F) -> 2022-01-16
2022-01-16 23:11:40 -08:00
635f345017 Start working on a Ruby port 2022-01-16 14:08:01 -08:00