[Bug 262988] sh: set builtin oddity

From: <bugzilla-noreply_at_freebsd.org>
Date: Fri, 01 Apr 2022 17:22:40 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262988

            Bug ID: 262988
           Summary: sh: set builtin oddity
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: bugs@FreeBSD.org
          Reporter: emaste@freebsd.org

It appears that `set` performs filename matching against a character class even
within single quotes.

For example:

$ touch a d
$ set -- '[preloaded]'
$ echo $1
a d

Discovered while investigating changes for https://reviews.freebsd.org/D34734;
Makefile.inc1 does "set -- $line" where line contains output from `ldd`.

-- 
You are receiving this mail because:
You are the assignee for the bug.