[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Unexpected tilde expansion
From: |
Greg Wooledge |
Subject: |
Re: Unexpected tilde expansion |
Date: |
Wed, 1 Jun 2016 11:12:59 -0400 |
User-agent: |
Mutt/1.4.2.3i |
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 'echo x=~'
> > x=/net/home/wooledg
> > imadev:~$ bash -posix -c 'echo x=~'
> > x=~
>
> Even if it's a bash extension, it should be documented. Christian is
> right in that it's an unexpected behavior.
It's documented (in reverse, by saying that POSIX mode *doesn't* do it)
at http://tiswww.case.edu/~chet/bash/POSIX which in turn is referenced
in the SEE ALSO section of the man page.