On 3/2/18 7:14 AM, Koncz, Istvan (Extern) wrote:

> Bash Version: 4.4
> Patch Level: 18
> Release Status: release
> Description:
> when i use ~/ for home folder it works in command line e.g. ls
> -la ~/.vimrc works, but when i add it to a variable e.g. foo="~/.vimrc"
> then ~/ will not be replaced to $HOME value like in command line, but i
> think it should be. ~ is a special character so must be escapped like
> \~ if i want the char, but without escape it should provide the home
> like in ls -la ~/ command. In my oppinion it is a bug.

It's not a bug. The tilde is quoted, and is not one of the special
characters that is interpreted inside double quotes.

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Reply via email to