Skip to content

$*/${*} expansion drops/mangles empty positional params and alternate-text spacing: two GNU divergences after set -- "a b" '' c #1993

Closed

Description

@caomengxuan666

来源与复核

冗余清扫 A 类簇(clean-rubash-perf)平价探针 p1 旁发现,冻结尖既存分歧(其基线与出货树逐字节同差、非清扫引入);主会话 2026-10-28 亲测复核(GNU bash 5.3.20 oracle vs 该簇基线二进制):

set -- "a b" '' c 后:

  1. IFS= 下未引号 $*:rubash 输出 [a b][][c](空位置参数留作字段),GNU [a b][c](空参在 dollar_at 词表中剔除)。
  2. unset IFS 后 echo "${1+ $* }":rubash a b c,GNU a b c (备选文本的空白保留、按 IFS 首字连接参数)。

两处同在 $/${} 展开面(GNU subst.c string_list_pos_params / POSIX interp 888 门面)。

归宿

参数词批(与 #1960 同批)。回归钉:两形各一条、断言按 GNU 输出。证据:~/workspace/clean-rubash-perf/REPORT.md §六与 probes/ p1。

Activity

  1. added
    bug
    gnu-baseline
    P2-medium
    area:expansion
    on Oct 28, 2026
  2. added a commit that references this issue on Oct 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

P2-mediumarea:expansionbuggnu-baseline

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions