Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14451
| Path | csiph.com!3.us.feeder.erje.net!feeder.erje.net!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Clint Hepner <clint.hepner@gmail.com> |
| Newsgroups | gnu.bash.bug |
| Subject | Tilde expansion in assignment-like context |
| Date | Mon, 6 Aug 2018 15:09:59 -0400 |
| Lines | 50 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.4762.1533582607.1292.bug-bash@gnu.org> (permalink) |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 (Mac OS X Mail 10.3 \(3273\)) |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | usenet.stanford.edu 1533582608 5155 208.118.235.17 (6 Aug 2018 19:10:08 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | bug-bash@gnu.org |
| Envelope-to | bug-bash@gnu.org |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=+E0HFCFsDDIMjmxnHor3Jj+2sLPqoVN+GZNnOLE0Tko=; b=GXxU7zC6NV1ewb9tdomHZjGPFSuDcfM7YsPQG0eIlygA6m0WBmWMtiiEx1zMFBjkSs s2a/xNbb4CzEI6UkrnnkBysVnljbKhJ0YLwea3p2nt/Sodw7CyeE24WrQiHQZIxfQ215 2Oabgx28LcDvNmmQEriBwmGkMYhQUjFo+ZfFOjly8i1TdMR8ixDaouxQUxh5Y89P3Iq5 9m/iH4WWIVNcDaHS7t8ZBRGGqeMCwedOOF431TYxreYWEGdQ9XpqT9GmAhfDYnTDP7M9 0vLJOHZKj0bEImcZBhxdQYbgbqAYV/zXhfR5tPTE3W27gTtPWa/BiNSznqZAnRDitIqb 66CA== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=+E0HFCFsDDIMjmxnHor3Jj+2sLPqoVN+GZNnOLE0Tko=; b=P74ULbbydZ1rElCvYawcHB2aYoOGoZaWCaBIXxBXBBJnnRTAf8IzaJzvP1ugDxi8Gr 6ooofqMMzJxs7rS6i8ezSNmJicz3vuN1HZSc2P8S6axpayxi40rYRw7aOxizh+TjwZwI Ht+nKJX4ezbo5DF4T2ZrFMxsYZvxfnwWrTc9/C6jDhQbK1YmSbCddDTuvuM09k+fW4+i q0goOkG7lcso20ITNANsQv1kc4b1V+UloP4TNuUHpLUwiq0H/kyCyoqllRwABihnEMAR asz5RfICh6mESjuQ0s1+7YO6UjnXEDXrRRshZJg736CkJA2/R2VXU+eG+R4LEbw4slah Bxcw== |
| X-Gm-Message-State | AOUpUlF4eJ9j7gov3hzGJr+mFWu1YCgDPYQAU4kKF24R+itkRKIkbx9y qLjLj0nmf2txzF6a7QqmfN9UuhEG |
| X-Google-Smtp-Source | AAOMgpce0spXziLWYSrnkblp3IaUmm2dBlHcXphO1wrCNEGkcuUrRMhY8AIhDJgULhJ8FDVwb0Juyg== |
| X-Received | by 2002:a37:30d5:: with SMTP id w204-v6mr14887420qkw.317.1533582601884; Mon, 06 Aug 2018 12:10:01 -0700 (PDT) |
| X-Mailer | Apple Mail (2.3273) |
| X-detected-operating-system | by eggs.gnu.org: Genre and OS details not recognized. |
| X-Received-From | 2607:f8b0:400d:c09::22d |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.21 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash/> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:14451 |
Show key headers only | View raw
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: darwin16.7.0
Compiler: clang
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='d\
arwin16.7.0' -DCONF_MACHTYPE='x86_64-apple-darwin16.7.0' -DCONF_VENDOR='apple' \
-DLOCALEDIR='/usr/local/Cellar/bash/4.4.19/share/locale' -DPACKAGE='bash' -DSHE\
LL -DHAVE_CONFIG_H -DMACOSX -I. -I. -I./include -I./lib -I./lib/intl -I/priv\
ate/tmp/bash-20180209-55597-111ek7c/bash-4.4/lib/intl -DSSH_SOURCE_BASHRC -Wno\
-parentheses -Wno-format-security
uname output: Darwin hemma.local 16.7.0 Darwin Kernel Version 16.7.0: Thu Jun 2\
1 20:07:39 PDT 2018; root:xnu-3789.73.14~1/RELEASE_X86_64 x86_64
Machine Type: x86_64-apple-darwin16.7.0
Bash Version: 4.4
Patch Level: 19
Release Status: release
Description:
A non-initial unquoted tilde is expanded outside of an assignment. This
was raised as a question on Stack Overflow, https://stackoverflow.com/q/51713759/1126841.
Repeat-By:
$ set +k
$ echo home_dir=~
home_dir=/Users/chepner
A similar string that does not start with a valid identifier leaves the tilde unexpanded.
$ echo --home_dir=~
--home_dir=~
The behavior is also present in commit 057a9fbdb4d9ad01b000743fcea9918b80823afc, bash-20180803 snapshot.
Fix:
[Description of how to fix the problem. If you don't know a
fix for the problem, don't include this section.]
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
Tilde expansion in assignment-like context Clint Hepner <clint.hepner@gmail.com> - 2018-08-06 15:09 -0400
csiph-web