Re: Formatting Curmudgeons WAS: MMAP Buffers

Andrew Dunstan <andrew@dunslane.net>

From: Andrew Dunstan <andrew@dunslane.net>
To: Greg Smith <greg@2ndquadrant.com>
Cc: Christopher Browne <cbbrowne@gmail.com>, PG Hackers <pgsql-hackers@postgresql.org>
Date: 2011-04-17T08:31:59Z
Lists: pgsql-hackers

On 04/17/2011 04:08 AM, Greg Smith wrote:
> Andrew Dunstan wrote:
>> What makes you think this isn't possible to run pgindent? There are 
>> no secret incantations.
>
> The first hit newbies find looking for info about pgident is 
> http://blog.hagander.net/archives/185-pgindent-vs-dash.html which sure 
> looks like secret incantations to me.  The documentation 
> src/tools/pgindent/README reads like a magic spell too:
>
>    find . -name '*.[ch]' -type f -print | \
>    egrep -v -f src/tools/pgindent/exclude_file_patterns | \
>    xargs -n100 pgindent src/tools/pgindent/typedefs.list


That's the incantation for indenting the whole of the source code. But 
very few people want to do that. Most people just want to indent a 
single file, for which the incantation is "pgindent path_to_typedefs 
my_file.c". See in another message my suggestion for defaulting the 
typedefs arg, so you'd just be able to say "pg_indent my_file.c".


cheers

andrew