Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #14212 > unrolled thread
| Started by | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| First post | 2018-06-03 14:32 -0400 |
| Last post | 2018-06-03 14:32 -0400 |
| Articles | 1 — 1 participant |
Back to article view | Back to gnu.bash.bug
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Bash don't interpret ~ path with multiple options. Chet Ramey <chet.ramey@case.edu> - 2018-06-03 14:32 -0400
| From | Chet Ramey <chet.ramey@case.edu> |
|---|---|
| Date | 2018-06-03 14:32 -0400 |
| Subject | Re: Bash don't interpret ~ path with multiple options. |
| Message-ID | <mailman.1069.1528050734.1292.bug-bash@gnu.org> |
On 6/2/18 10:08 PM, Jungsub Shin wrote: > When i try mount aufs, i find some problem with bash. > > # mount -o remount,append=~/test_aufs/ro1=ro+wh ~/test_aufs/mount > > mount failed with ~/test_aufs/ro1 path isn't exist message. > So i try to debug with strace and i find out bash don't replace ~ > path to absolute path. > > So i try again with split options lile below. > > # mount -o remount -o append=~/test_aufs/ro1=ro+wh ~/test_aufs/mount > > It works well. is this bug?? No. Tilde expansion happens at the beginning of a word or after the `=' and every `:' on the rhs of an assignment statement. Bash extends this to words that satisfy the criteria for assignment statements but appear as arguments to a command (so things like `export DIR=~/foo' work). The `remount,append=...' word does not satisfy the requirements for an assignment statement, since the characters before the `=' don't make up a valid shell identifier, so the tilde doesn't get expanded. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
Back to top | Article view | gnu.bash.bug
csiph-web