help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tilde expansion problems


From: Hugo Raguet
Subject: Tilde expansion problems
Date: Fri, 26 Jan 2018 19:53:37 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

I encountered some problems with tilde expansion.

It seems that
    > mkdir('~/foo/bar')
actually creates the directories 'bar' and 'foo' within a directory '~'
in the current workspace. Is the lack of tilde expansion intentional?

Moreover, I know that for instance the function
    > exist('~/foo/bar')
_would find_ '$HOME/foo/bar', but it finds also an actual '~/foo/bar'
within the current workspace.

I had trouble, because in some script, I use
    > if not(exist('~/foo/bar')), mkdir('~/foo/bar'), end
and it took me some times to understand why it does not create
'$HOME/foo/bar', and why 'exist('~/foo/bar')' evaluates to 1 consequently.

Should we do something about this?
Hugo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]