#1095985 dash: Quote removal happening too early

Package:
dash
Source:
dash
Description:
POSIX-compliant shell
Submitter:
Date:
2026-06-10 03:31:01 UTC
Severity:
normal
#1095985#5
Date:
2025-02-14 16:40:32 UTC
From:
To:
Dear Maintainer,

this is basically a copy of https://bugs.debian.org/443685 but for dash
instead of bash.

The discussion at https://austingroupbugs.net/view.php?id=1234 is
helpful.

This behavior of bash is the correct posix behavior:
```
$ bash -o posix -c 'a=\\; echo $a\/*'
/bin /boot /dev /etc /home /initrd.img /initrd.img.old /lib /lib64 /lost+found /media /mnt /opt /proc /root /run /sbin /srv /sys /tmp /usr /var /vmlinuz /vmlinuz.old
```

dash instead behaves this way:
```
$ dash -c 'a=\\; echo $a\/*'
\/*
```

#1095985#10
Date:
2026-06-10 03:00:28 UTC
From:
To:
This is not a bug.  The backslash in $a joins up with the backslash
before the slash, thus forming a double backslash which is taken
as a a literal backslash.

This does not contradcit any existing POSIX standard.

In fact every shell other than bash does the same thing.

Cheers,