Re: Unexpected tilde expansion

2016-06-01 Thread Chet Ramey
On 6/1/16 9:33 AM, Christian wrote: > Hello, > > I have been playing around with tilde expansion lately and I think i > have discovered a case where the tilde is expanded where it, according > to the documentation, should not. When running in its default mode, bash expands the tilde in that situa

Re: Unexpected tilde expansion

2016-06-01 Thread Greg Wooledge
On Wed, Jun 01, 2016 at 04:57:46PM +0200, Ángel González wrote: > On 2016-06-01 at 10:40 -0400, Greg Wooledge wrote: > > On Wed, Jun 01, 2016 at 03:33:23PM +0200, Christian wrote: > > > sh and zsh both return the expected x=~ > > > > > > sh -c "echo x=~" > > > > > > x=~ > > > > imadev:~$ bash -c

Re: Unexpected tilde expansion

2016-06-01 Thread Ángel González
On 2016-06-01 at 10:40 -0400, Greg Wooledge wrote: > On Wed, Jun 01, 2016 at 03:33:23PM +0200, Christian wrote: > > sh and zsh both return the expected x=~ > > > > sh -c "echo x=~" > > > > x=~ > > imadev:~$ bash -c 'echo x=~' > x=/net/home/wooledg > imadev:~$ bash -posix -c 'echo x=~' > x=~ Eve

Re: Unexpected tilde expansion

2016-06-01 Thread Greg Wooledge
On Wed, Jun 01, 2016 at 03:33:23PM +0200, Christian wrote: > sh and zsh both return the expected x=~ > > sh -c "echo x=~" > > x=~ imadev:~$ bash -c 'echo x=~' x=/net/home/wooledg imadev:~$ bash -posix -c 'echo x=~' x=~

Unexpected tilde expansion

2016-06-01 Thread Christian
Hello, I have been playing around with tilde expansion lately and I think i have discovered a case where the tilde is expanded where it, according to the documentation, should not. When running: $ x=~ x is set to the current users home directory as expected. $ echo $x /home/christian But whe