Releases: brianjfox/gnash
Release list
gnash 1.3.9
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
$LINENOinside aDEBUG/RETURN/ERRtrap body reports the line of the
command that fired the trap, not the trap body's own line.- A function invoked while the
DEBUGtrap is running (including the trap
handler itself) no longer spuriously fires theRETURNtrap. - The whole-body
DEBUGtrap 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
DEBUGtrap fires for each expression of an arithmeticfor (( ; ; ))
loop, and thecallerbuiltin now matches bash (top-level form, option and
invalid-number diagnostics).
Programmable completion
complete -preconstructs each specification in bash's canonical option and
action order with correct quoting, listed in bash's hash-table walk order.compgengains thesetopt,shopt,enabled, andhelptopicaction
generators, the-V varnameand-X filterpatoptions, and bash's
option/action/identifier diagnostics;compoptvalidates-ooption names.
Functions
- Enforce
FUNCNESTto cap function-call recursion. - Reject a function name containing an unquoted
$, and prefixfunctionto a
non-identifier name indeclare -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 acrossprintf -v,read,
unset, assignment, arithmetic,${a[sub]}, andtest -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
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 subscripteddeclarename. - 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 -pandsetoutput.
Special and virtual variables
- Expose the special virtual arrays in
declare/setlistings, and list
BASH_ALIASESandBASH_CMDSas associative arrays. - Treat a declared-but-unset variable as unset for
-v.
Builtins
umask:-S,-p, and symbolic modes.cd: searchCDPATH.source:source -p PATH, honor thesourcepathshopt, pass positional
parameters to a sourced file, and fix its error prefix.enable -sfilters to the POSIX special builtins.- Keep prefix assignments to
export/readonly/declare -xpermanent. shoptreports an error for an invalid option or-oname, and
emacs/monitor/privilegedare recorded asset -ooption state.
Control flow and scripts
- Propagate
continue Nthrough enclosing loops. - Re-exec a script with no
#!line using the current shell.
Signals
- List signals in columns, and add
SIGEMT,SIGIO, andSIGINFO.
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
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 depthon write,circular name referenceon
read); at global scope a direct self reference is still an error. unset -nremoves the nameref itself; a temporary assignment to a nameref is
scoped to its command; a nameref used as aforloop 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 -aon an unset
nameref converts it to a real array.
Arrays and declare / typeset
declare -pfilters 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.+Xattribute removal,name+=value,-u/-l/-ccase 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 forreadonly/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 ofdotglobmatches.
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
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
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, theset -o
listing, and$-— and, like bash, ignored when interactive. A mid-script
set -ntakes 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 (\xHHand\x{...}), Unicode
(\uHHHH/\UHHHHHHHH, encoded as UTF-8), control (\cX), and\E/\?,
matching bash'sansicstr. !inside single quotes. A!in'...'was treated as a history
expansion; it is now left literal, matching bash's
history_quotes_inhibit_expansiondefault. (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
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
personalityswitch 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
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
gnash 1.3.2
Bug-fix release over 1.3.1.
Fixes
execresolves 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-lflags."$@"/"${a[@]}"no longer drop an empty element
(set -- "" x ""; for a in "$@"now iterates three times).ulimitreports a single resource as a bare value (ulimit -n→1048576),
and multiple resource flags each print a labeled line.set -uno 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 fatalset -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
gnash 1.3.1
Bug-fix release over 1.3.0.
Fixes
- Arithmetic
base#numbernotation now evaluates to the value, not the base:
$((16#ff))→ 255,$((2#101))→ 5,$((10#42))→ 42 (bases 2–64). set -o pipefailis 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
gnash 1.3.0
A feature release focused on deepening the shell personalities.
Highlights
- readline vi editing mode —
set -o vinow provides a working vi command mode: motions,d/c/yoperators with counts,f/tfind,x/r/~/p, undo, and insert-mode entry. personality/emulatebuiltin — switch the shell's personality at runtime, with syntax identical to zsh'semulate:personality zshswitches live;personality zsh -c '…'runs a command under a personality then restores it;personality -L zshis local to the enclosing function.emulateis the zsh-mode alias.
- True-to-zsh parameter expansion (under
--personality=zsh):- No word-splitting of unquoted
$var(zsh'sSH_WORD_SPLIToff), while command substitution still splits. - Bare
$arrayexpands 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 (joinj/F, splits/f, sorto/O/n, uniqueu, caseL/U/C, keys/valuesk/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).
- No word-splitting of unquoted
- csh/tcsh word-initial tilde expansion —
echo ~and~usernow expand.
Install
brew tap brianjfox/tools && brew install gnash
Or download the universal (arm64 + x86_64) macOS tarball below.