~emersion/mrsh

ref: 07e65a3a88e03c6d9e6f1f6ac4a1cfa9a74a9b09 mrsh/shell d---------
shell/arithm: implement assignments

The parser still chokes on assignments with an operation.
shell/arithm: strip mrsh_ prefix for static functions

The mrsh_ prefix is reserved for exported, public functions.
shell: make mrsh_run_arithm_expr take a mrsh_state

This function needs access to the shell's state to assign to variables.
mrsh_state: move loop control into call frame
mrsh_state: rename args field to frame
Change fprintf(stderr, …, strerror(errno)) to perror
shell/job: fix setpgid failed if session leader

The process group ID of a session leader cannot change.
shell/task: perform pathname expansion on for loop words

Closes: https://github.com/emersion/mrsh/issues/83
builtin/set: implement set -o to print all options
shell/task: simplify case clause matching
shell/task: fix case not handling quoted strings

Executing a case with a quoted string in a pattern resulted in:

    mrsh: ../ast.c:343: mrsh_word_get_string: Assertion `word->type == MRSH_WORD_STRING' failed.
Partially implement arithmetic expansion

The only expansion missing is assignment expansion, which requires more
discussion.

Additionally, the parser is missing variable support, e.g. $((var+1)).
builtin/exit: exit immediately

Closes: https://github.com/emersion/mrsh/issues/37
shell/task/word: fix $!
shell/job: fix job ID not incremented
shell/task/pipeline: don't leak next stdin FD

Closes: https://github.com/emersion/mrsh/issues/95
jobs(1): job_state_str: add parenthesized info

This completes the jobs(1) implementation.
jobs(1): implement <current> marker
job_by_id: add job id by command

This completes the XBD job control ID implementation.
shell/job: store AST node in job

Updates https://github.com/emersion/mrsh/issues/1
Next