Skip to content

[bug] compat [@] behaviors ignored (unset-unbind, test -v any-element) #1108

Closed

Description

@caomengxuan666

[bug] compat [@] behaviors ignored: unset 'a[@]' empties instead of unbinding; test -v 'A[@]' looks for literal @ key

shopt -s compat44; a=(1 2); unset 'a[@]'; declare -p a; echo rc=$?
# GNU (fires under EVERY compat flag): declare: a: not found, rc 1
# niu: declare -a a=(), rc 0
shopt -s compat44; declare -A K; K[x]=1; test -v 'K[@]'; echo rc=$?
# GNU: 0 (any-element) | niu: 1

High (unset) / medium (test -v): variable-lifetime semantics.

Env: niubash 1.4.4 / rubash engine (master ~2026-10), GNU bash 5.3.20 aarch64-linux-android as oracle.

Activity

  1. added
    bug
    gnu-baseline
    area:builtins
    P1-high
    on Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1-higharea:builtinsbuggnu-baseline

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions