On Wed, Jun 12, 2019, 5:16 AM Paul McQuesten <mcquesten at gmail.com> wrote:
I'm aware of that, but that isn't the case that is being discussed, as the
example given clearly had a tilde (and spaces) in the middle of the file.
Backup files witilde suffix does not trigger the bug being discussed. It's
*only* files paths where the tilde is surrounded on both by spaces (or on
the right by the end fo the string) that trigger it.
[1] "a /Users/gabrielbecker b"
path.expand("myfile.txt~")
path.expand("myfile.txt ~")
[1] "myfile.txt /Users/gabrielbecker"
All that said I'm really not interested in participating in a flame war
over this. I gave my 2 cents as respectfully as I could, so as of now
please consider my participation and interest in this thread closed.
Best,
~G
On Wed, Jun 12, 2019 at 2:43 AM Kurt Hornik <Kurt.Hornik at wu.ac.at> wrote:
With c76695 in the trunk, we now only tilde expand file names starting
with a tilde also when using readline.
Best
-k
On 11/06/2019 4:34 p.m., William Dunlap via R-devel wrote:
Note that R treats tildes in file names differently on Windows and
On Windows, it is only replaced if it it at the beginning of the line
is followed by a forward or backward slash or end-of-line. On Linux
replaced no matter where it is in the text and ~someUser will be
by someUser's home directory (if 'someUser' is a user with a home
directory).
That's not quite true: On Linux the bug is in the code that uses
libreadline, which you don't have to use. If you just specify
"--no-readline" when you start R, it will be fine on Linux, as far as
I wouldn't choose that as the default way to run R (it's pretty
irritating not to have readline support), but it is a workaround for
this bug.
Hence, if you have a Windows machine that can look at the file
your Linux machine you can use file.rename on Windows to change the
My inclination would be to use a bash script on Linux to change the
but if you are not comfortable with bash try the Windows approach.
Bill Dunlap
TIBCO Software
wdunlap tibco.com
On Tue, Jun 11, 2019 at 1:13 PM Frank Schwidom <schwidom at gmx.net>
Hi Gabriel,
I actually want to make renames over thousands of files. But if I am
able to express the source filename of the rename operation I will
able to get the work done. Besides the fact that there are issues I
that R is qualified for solving my problem by the method how it can
long vectors of strings, booleans and also lists.
Kind regards,
Frank
On 2019-06-11 09:49:17, Gabriel Becker wrote:
Hi Frank,
I'm hesitant to be "that guy", but in case no one else has brought
to you, having files with a tilde in their names (generally but
on a linux system, where ~ in file names has a very important
meaning in some cases, as we know) strikes me as an exceptionally
practice anyway. In light of that, the solution with the smallest
of pain for you is almost surely to just... not do that. Your
will be better for it anyway.
There is a reason no one has complained about this before, and
haven't run a study or anything, I strongly suspect its that
else is already on the "no tildes in filenames" bandwagon, so this
behavior, even if technically a bug, has no ability to cause them
problems.
Best,
~G
On Tue, Jun 11, 2019 at 8:25 AM Frank Schwidom <[1]
wrote:
Hi,
yes, I have seen this package and it has the same tilde expanding
problem.
Please excuse me I will cc this answer to r-help and r-devel to
discussion running.
Kind regards,
Frank Schwidom
On 2019-06-11 09:12:36, G?bor Cs?rdi wrote:
Just in case, have you seen the fs package?
[2]https://fs.r-lib.org/
Gabor
On Tue, Jun 11, 2019 at 7:51 AM Frank Schwidom <[3]
Hi,
to get rid of any possible filename modification I started a
project to cover my usecase:
Thanks in advance
Frank Schwidom
On 2019-06-07 09:04:06, Richard O'Keefe wrote:
How can expanding tildes anywhere but the beginning of a
considered a bug?
On Thu, 6 Jun 2019 at 23:04, Ivan Krylov
<[1][5]krylov.r00t at gmail.com> wrote:
On Wed, 5 Jun 2019 18:07:15 +0200
Frank Schwidom <[2][6]schwidom at gmx.net> wrote:
> +> path.expand("a ~ b")
> [1] "a /home/user b"
> How can I switch off any file crippling activity?
It doesn't seem to be possible if readline is enabled
correctly.
Calls to path.expand [1] end up [2] in R_ExpandFileName
calls R_ExpandFileName_readline [4], which uses
tilde_expand [5]. tilde_expand seems to be designed to
anywhere in the string it is handed, i.e. operate on
lines, not file paths.
I am taking the liberty of Cc-ing R-devel in case this
considered a bug.
--
Best regards,
Ivan
[1]