export var=~root does not expand ~root to /root
Bug #1908025 reported by
Ian! D. Allen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
dash (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Shouldn't these give the same results in dash, i.e. "/root"?
They give the same output in bash.
$ dash
$ var=~root
$ echo "$var"
/root
$ export var=~root
$ echo "$var"
~root
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: dash 0.5.10.2-6
ProcVersionSign
Uname: Linux 5.4.0-56-generic x86_64
ApportVersion: 2.20.11-
Architecture: amd64
CasperMD5CheckR
Date: Mon Dec 14 00:14:44 2020
EcryptfsInUse: Yes
InstallationDate: Installed on 2020-10-07 (67 days ago)
InstallationMedia: Lubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
SourcePackage: dash
UpgradeStatus: No upgrade log present (probably fresh install)
To post a comment you must log in.
I agree that this is a useful feature (including that export a=$b does not split words and export a=* does not generate pathnames); FreeBSD sh has had it for a few years: https:/ /cgit.freebsd. org/src/ commit/ ?id=84fbdd8ca06 8ec63c6c9a93130 3d3811738128cb .
It is specified by https:/ /www.austingrou pbugs.net/ view.php? id=351 planned for the next major revision of POSIX.1.