[Top][All Lists]

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

Re: [Gnu-arch-users] Trying out the new escaping version...

From: Pierce T . Wetter III
Subject: Re: [Gnu-arch-users] Trying out the new escaping version...
Date: Thu, 18 Mar 2004 12:50:33 -0700

 Pulling together a lot of responses...

 Ok, so lets see if I can reinterpret what everyone is trying to say.

Escaping is supposed to be an implementation detail inside tla. So while it may be translating:

bad example.html



internally, "I" shouldn't have to know that.

So the "correct" way to add the above file is anything the shell is happy with:

tla add 'bad example.html'


tla add bad\ example.html

Which brings us to tla commands that output lists of files, like tla tree-lint -t

Right now, it outputs:


Tom considers this a bug. It should output:

bad example.html

Which makes a certain amount of sense. Christian would then do a --escaped option which would output:


Though I think that ends up not being so useful, because the escaping should be an internal issue. So I think that something like --quoted to output:

'bad example.html'
'gratuitous evil example\' with extra \\.html'

Would be good, not because tla needs it, but to make it easier to write scripts, and so that back ticks would "do the right thing" more often then not. This could possibly be the default since it would only "kick in" if the files had bad characters, in which case the scripts involve would need to deal with them anyways. Though perhaps this is more palatable:

bad\ example.html
gratuitous\ evil\ example\' with extra\ \\.html


  I think Tom is saying #1, I'm saying #2.

1. As a design principle, the escaping mechanism used _inside_ tla should mostly remain invisible to tla users. So --unescaped is basically to become the default, and without mucking about in tla internal files, it should be hard to see \(sp) anywhere.

2. It might be nice to have an option that would quote filenames with difficult characters to make scripts & backticks easier to deal with. The design principle is that there should be something such that:

  tla tree-lint -t --some_quoting_option

 Should output a list of files that the shell can deal with, such that:

  tla add `tree-lint -t`

  Works as it does for files without funny characters.


reply via email to

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