[Top][All Lists]

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

Re: [Gnu-arch-users] Re: tla-update-ids lacks support for filenames with

From: chth
Subject: Re: [Gnu-arch-users] Re: tla-update-ids lacks support for filenames with spaces
Date: Mon, 24 May 2004 19:42:01 +0200

> On Mon, May 24, 2004 at 04:33:30PM +0200, address@hidden wrote:
> > Further we will not need 2 forms of escaping and escaped forms of
> > filenames should not go into the filesystem when they do, there is a
> > bug somewhere.
> Great, but I still _want_ two forms of escaping, so I can gain the
> benefits of escaping (easy parseability), without the annoyances
> (overly complex parsing).
> So, --slightly-escaped, escapes space, newline, tab, backslash, that's
> it?

$ tla escape "`echo -e 'foo bar\tbaz\\'`" ; echo

there are already shortcuts for common characters and they are used by
default, in fact the \(U+..) escapes are currently only used for control
characters (<32 and 127), which are prolly never used in filenames, the
U+ stuff will only become important when tla gets unicode support.

Based on this you can make your own escaping engine in sed or such, but
you need to be aware that you are responsible for maintaining it when
something in the tla encoding will be changed (unlikely but not
impossible) and be gracefull if there are escapes that your simpler
engine cannt handle.  I added the 'tla escape' command to ensure that
tool writers always have an authorative implementation for the correct
escaping syntax.

The other problem with spawning a process for each 'tla escape' command
should be engaged somehow else in future (librification, stateful tla,
MaLa, ...). Thats surely needed, but using the current solution is
sematically correct and only affects performance.


reply via email to

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