[webkit-dev] file names with spaces

Maciej Stachowiak mjs at apple.com
Mon Mar 22 23:07:47 PDT 2010


On Mar 22, 2010, at 11:01 PM, Chris Jerdonek wrote:

> On Mon, Mar 22, 2010 at 10:46 PM, Maciej Stachowiak <mjs at apple.com>  
> wrote:
>
>> The most unavoidable exceptions seem to be for test cases that are
>> specifically testing what happens when you have a space in the  
>> filename, not
>> for third-party code. Does the no-spaces rule make it easier to  
>> write shell
>> commands if there are still files that violate it?
>
> If such files are fewer or limited to certain directories, it would be
> easier to screen them out using primitive techniques (e.g. excluding a
> test directory).

LayoutTests and WebCore/manual-tests clearly need to be exceptions, I  
don't know about the fonts in WebKitTools.

>
> In my case, I executed a command like the following (simplifying it
> for the sake of an example):
>
> find WebKitTools -type f -wholename '*' \
>     \! \( -wholename '*.svn*'  \) \
>     -print0 | xargs sed -i '' -e ''

I use this in my bash .aliases file for that sort of thing:

function rgrep()
{
     find . -type f | egrep -v '\.svn|ChangeLog' | sed -e 's/ /\\ /g'  
| xargs grep "$@";
}

(Note the sed to escape spaces instead of using -print0, so if I do  
"rgrep -l whatever" I can pipe the output.)

Regards,
Maciej



More information about the webkit-dev mailing list