Skip to content

Releases: brianjfox/gnash

gnash 1.3.9

Choose a tag to compare

@brianjfox brianjfox released this 22 Jul 02:32
Immutable release. Only release title and notes can be modified.

gnash 1.3.9

A continued bash-conformance release. Since 1.3.8, gnash has been run
against further batches of bash 5.3's own test suite and brought into
byte-for-byte agreement across debugger support, programmable completion,
functions, and array subscripts. Highlights below; a number of smaller
fidelity fixes are included.

Debugger support, DEBUG/RETURN traps, and $LINENO

  • $LINENO inside a DEBUG/RETURN/ERR trap body reports the line of the
    command that fired the trap, not the trap body's own line.
  • A function invoked while the DEBUG trap is running (including the trap
    handler itself) no longer spuriously fires the RETURN trap.
  • The whole-body DEBUG trap reports a function's definition line, command
    substitutions run at their enclosing line, and a sourced file gets its own
    line numbering starting at 1.
  • The DEBUG trap fires for each expression of an arithmetic for (( ; ; ))
    loop, and the caller builtin now matches bash (top-level form, option and
    invalid-number diagnostics).

Programmable completion

  • complete -p reconstructs each specification in bash's canonical option and
    action order with correct quoting, listed in bash's hash-table walk order.
  • compgen gains the setopt, shopt, enabled, and helptopic action
    generators, the -V varname and -X filterpat options, and bash's
    option/action/identifier diagnostics; compopt validates -o option names.

Functions

  • Enforce FUNCNEST to cap function-call recursion.
  • Reject a function name containing an unquoted $, and prefix function to a
    non-identifier name in declare -f.
  • Report an error for a malformed integer-attribute assignment (i=0#4).

Arrays

  • Array and associative subscripts are scanned by a single quote-aware parser,
    so a key containing ] — escaped (a[x\]y]), quoted (a["p]q"]), or from a
    substitution (a[$(cmd)]) — is handled consistently for assignment, ${...}
    reads, and compound literals.
  • Implement shopt -s array_expand_once: an already-expanded array subscript is
    not re-expanded, so a command substitution left in it errors rather than
    running — closing a subscript-injection vector across printf -v, read,
    unset, assignment, arithmetic, ${a[sub]}, and test -v.
  • Implement test -v / [ -v ] for scalars and array elements.

Install

brew tap brianjfox/tools && brew trust brianjfox/tools && brew install gnash

Or download the universal (arm64 + x86_64) macOS tarball below.

gnash 1.3.8

Choose a tag to compare

@brianjfox brianjfox released this 21 Jul 13:45
Immutable release. Only release title and notes can be modified.

gnash 1.3.8

A continued bash-conformance release. Since 1.3.7, gnash has been run
against further batches of bash 5.3's own test suite and brought into
byte-for-byte agreement across arrays, builtins, and control flow.
Highlights below; a number of smaller fidelity fixes are included.

Arrays and declare

  • Unset individual array elements, and diagnose bad and readonly
    array-element assignments.
  • Parse a quoted compound array value in declare, and create an indexed
    array from a subscripted declare name.
  • Slice an indexed array by index rather than dense position, and drop empty
    elements from an unquoted array expansion.
  • Reject bad subscripts in a compound array literal and a bare value mixed
    into an associative-array literal; quote associative-array subscripts in
    declare -p and set output.

Special and virtual variables

  • Expose the special virtual arrays in declare/set listings, and list
    BASH_ALIASES and BASH_CMDS as associative arrays.
  • Treat a declared-but-unset variable as unset for -v.

Builtins

  • umask: -S, -p, and symbolic modes.
  • cd: search CDPATH.
  • source: source -p PATH, honor the sourcepath shopt, pass positional
    parameters to a sourced file, and fix its error prefix.
  • enable -s filters to the POSIX special builtins.
  • Keep prefix assignments to export/readonly/declare -x permanent.
  • shopt reports an error for an invalid option or -o name, and
    emacs/monitor/privileged are recorded as set -o option state.

Control flow and scripts

  • Propagate continue N through enclosing loops.
  • Re-exec a script with no #! line using the current shell.

Signals

  • List signals in columns, and add SIGEMT, SIGIO, and SIGINFO.

Install

brew tap brianjfox/tools && brew trust brianjfox/tools && brew install gnash

Or download the universal (arm64 + x86_64) macOS tarball below.

gnash 1.3.7

Choose a tag to compare

@brianjfox brianjfox released this 19 Jul 00:03
Immutable release. Only release title and notes can be modified.

gnash 1.3.7

A large bash-conformance release. Since 1.3.6, gnash has been run against
bash 5.3's own test suite and brought into byte-for-byte agreement across
many areas. Highlights below; dozens of smaller fidelity fixes are included.

Namerefs (declare -n)

Namerefs are now close to bash's behavior end to end:

  • Target validation: invalid targets (declare -n r=/, r="a b", an empty
    target) are rejected with bash's exact diagnostics and leave no half-created
    variable.
  • Circular references: a self reference at function scope warns and resolves at
    global scope (maximum nameref depth on write, circular name reference on
    read); at global scope a direct self reference is still an error.
  • unset -n removes the nameref itself; a temporary assignment to a nameref is
    scoped to its command; a nameref used as a for loop variable retargets each
    iteration; ${!ref} yields the referenced name.
  • Array interactions: a nameref can target an array element (declare -n r=a[2]);
    making an existing array a nameref is rejected; declare -a on an unset
    nameref converts it to a real array.

Arrays and declare / typeset

  • declare -p filters by attribute when given no names, lists by attribute,
    fixes flag order and associative-array formatting, and iterates associative
    arrays in bash's hash order.
  • +X attribute removal, name+=value, -u/-l/-c case folding, and
    arithmetic evaluation of integer array-element assignments.
  • Rejects converting an array between indexed and associative, assigning a list
    to a single element, and a subscripted target for readonly/export.

Traps and signals

Implemented the ERR, RETURN, and DEBUG traps (including firing for a
function body on entry under functrace and for self-installed traps), the
SIGCHLD trap on child reap, $BASH_TRAPSIG, bash-format trap listing with
-p/-P/-l, ignored-signal listing, kill -l, and $PS4 xtrace expansion.

Job control, expansions, and globbing

  • Correct & / ; precedence, chained & as separate jobs, time,
    lastpipe, and $PIPESTATUS.
  • Brace expansion: sequences with increments and zero-padding, nested and
    unmatched braces, escaped/quoted commas.
  • Parameter and arithmetic expansion: ${@}/${*} lists, ${#@},
    per-element operators, $[...], arithmetic error messages, $'...'
    ANSI-C quoting inside ${...} and here-document defaults, case-toggle
    operators.
  • Globbing: dotglob/extglob, globskipdots, GLOBIGNORE, and keeping
    ./.. out of dotglob matches.

Builtins and readline

Rewrote getopts to match bash, improved type, pushd/popd/dirs,
exported functions via the environment, restricted-shell mode, POSIX mode from
POSIXLY_CORRECT, set -k, and $SHELLOPTS/$- option state. The read,
history, and fc builtins and the default emacs/vi keybindings now match
bash on its own test suites.

Install

brew tap brianjfox/tools && brew trust brianjfox/tools && brew install gnash

Or download the universal (arm64 + x86_64) macOS tarball below.

gnash 1.3.6

Choose a tag to compare

@brianjfox brianjfox released this 12 Jul 21:58
Immutable release. Only release title and notes can be modified.

gnash 1.3.6

Install

brew tap brianjfox/tools && brew trust brianjfox/tools && brew install gnash

Or download the universal (arm64 + x86_64) macOS tarball below.

gnash 1.3.5

Choose a tag to compare

@brianjfox brianjfox released this 11 Jul 08:40
Immutable release. Only release title and notes can be modified.

gnash 1.3.5

Bug-fix release over 1.3.4, improving bash fidelity in three areas.

Fixes

  • -n (noexec) now works. The flag was accepted but never acted on, so
    scripts ran instead of being syntax-checked. Commands are now parsed but not
    executed, honored through -n, set -n, set -o noexec, the set -o
    listing, and $- — and, like bash, ignored when interactive. A mid-script
    set -n takes effect for the commands that follow it.
  • ANSI-C $'...' numeric escapes. Only single-letter escapes were decoded,
    so \033, \x41, , and friends leaked through as literal text. The
    quoting now decodes octal (\nnn), hex (\xHH and \x{...}), Unicode
    (\uHHHH / \UHHHHHHHH, encoded as UTF-8), control (\cX), and \E / \?,
    matching bash's ansicstr.
  • ! inside single quotes. A ! in '...' was treated as a history
    expansion; it is now left literal, matching bash's
    history_quotes_inhibit_expansion default. (Double quotes still expand it.)

Install

brew tap brianjfox/tools && brew trust brianjfox/tools && brew install gnash

Or download the universal (arm64 + x86_64) macOS tarball below.

gnash 1.3.4

Choose a tag to compare

@brianjfox brianjfox released this 08 Jul 16:30
Immutable release. Only release title and notes can be modified.

gnash 1.3.4

Bug-fix release over 1.3.3.

Fixes

  • Incremental search cursor. During C-r / C-s history search, a found match
    now leaves the cursor at the start of the matched string (the last occurrence
    for a reverse search, the first for a forward one), rather than at the end of
    the line -- matching bash.
  • Completion under set -o vi. The personality's TAB completion style
    (zsh menu vs insert-common-prefix) is now bound in the vi-insert keymap as well
    as emacs, so completion behaves correctly in vi editing mode and a runtime
    personality switch re-hooks both keymaps.

Install

brew tap brianjfox/tools && brew trust brianjfox/tools && brew install gnash

Or download the universal (arm64 + x86_64) macOS tarball below.

gnash 1.3.3

Choose a tag to compare

@brianjfox brianjfox released this 06 Jul 17:56
Immutable release. Only release title and notes can be modified.

gnash 1.3.3

A feature release over 1.3.2, focused on interactive tab completion.

Highlights

  • Command-position completion. Completing the first word of a command now offers
    every kind of command -- shell keywords, aliases, functions, builtins, and
    executables on $PATH -- instead of only filenames. Arguments (and any word
    containing a /) still complete filenames.
  • zsh-style completion menu. Under the zsh personality the candidate listing now
    prints below the input line while the cursor stays on the line (it no longer
    marches down the screen), and the listing is cleared on the next keystroke.
  • Runtime personality switching now re-hooks readline. After personality zsh /
    emulate zsh (or switching away), the persona's readline behavior -- live
    highlighting, TAB completion style, and dotfile hiding -- takes effect immediately.

Install

brew tap brianjfox/tools && brew trust brianjfox/tools && brew install gnash

Or download the universal (arm64 + x86_64) macOS tarball below.

gnash 1.3.2

Choose a tag to compare

@brianjfox brianjfox released this 06 Jul 15:52
Immutable release. Only release title and notes can be modified.

gnash 1.3.2

Bug-fix release over 1.3.1.

Fixes

  • exec resolves the command through the shell's $PATH (it used the process
    environment's PATH, so it could report "not found" for a command the rest of the
    shell runs). Adds the -a, -c, and -l flags.
  • "$@" / "${a[@]}" no longer drop an empty element
    (set -- "" x ""; for a in "$@" now iterates three times).
  • ulimit reports a single resource as a bare value (ulimit -n1048576),
    and multiple resource flags each print a labeled line.
  • set -u no longer errors on the defaulting operators ${x:-word}, ${x-word},
    ${x:=word}, ${x+word}, ${x?msg}, …; the ${x?msg} operator now reports its
    message, and fatal set -u / ${x?} errors exit with status 127, matching bash.

All are fixes in the shared engine, so they apply under every personality.
This release also repairs the bash differential test harness, which had silently
become a no-op.

Install

brew tap brianjfox/tools && brew trust brianjfox/tools && brew install gnash

Or download the universal (arm64 + x86_64) macOS tarball below.

gnash 1.3.1

Choose a tag to compare

@brianjfox brianjfox released this 06 Jul 14:50
Immutable release. Only release title and notes can be modified.

gnash 1.3.1

Bug-fix release over 1.3.0.

Fixes

  • Arithmetic base#number notation now evaluates to the value, not the base:
    $((16#ff)) → 255, $((2#101)) → 5, $((10#42)) → 42 (bases 2–64).
  • set -o pipefail is now honored — a pipeline's exit status is the last
    (rightmost) command to exit non-zero, instead of always the last stage's.

Both are fixes in the shared Bourne engine, so they apply under every personality
(bash/zsh/ksh/ash).

Install

brew tap brianjfox/tools && brew install gnash

Or download the universal (arm64 + x86_64) macOS tarball below.

gnash 1.3.0

Choose a tag to compare

@brianjfox brianjfox released this 06 Jul 14:11
Immutable release. Only release title and notes can be modified.

gnash 1.3.0

A feature release focused on deepening the shell personalities.

Highlights

  • readline vi editing modeset -o vi now provides a working vi command mode: motions, d/c/y operators with counts, f/t find, x/r/~/p, undo, and insert-mode entry.
  • personality / emulate builtin — switch the shell's personality at runtime, with syntax identical to zsh's emulate:
    • personality zsh switches live; personality zsh -c '…' runs a command under a personality then restores it; personality -L zsh is local to the enclosing function.
    • emulate is the zsh-mode alias.
  • True-to-zsh parameter expansion (under --personality=zsh):
    • No word-splitting of unquoted $var (zsh's SH_WORD_SPLIT off), while command substitution still splits.
    • Bare $array expands to all elements.
    • 1-based array indexing with negative indices and ranges ($a[1], $a[-1], $a[2,4]), and brace-free subscripts / $#a.
    • ${(flags)…} expansion flags (join j/F, split s/f, sort o/O/n, unique u, case L/U/C, keys/values k/v), ${=name} forced splitting, and scalar character/substring indexing.
    • Flat key/value associative assignment h=(k1 v1 k2 v2) (also fixes this for the bash personality).
  • csh/tcsh word-initial tilde expansionecho ~ and ~user now expand.

Install

brew tap brianjfox/tools && brew install gnash

Or download the universal (arm64 + x86_64) macOS tarball below.