[GRASS-dev] list organization of g.list output

Hamish hamish_nospam at yahoo.com
Fri May 25 01:38:54 EDT 2007


Eric wrote:
> While we're on topic, maybe a separator parameter like g.mlist? I've
> always found that a very convenient feature.

Francesco wrote:
> ls changes to single column when ever stdout is not a tty.
> That approach could be useful in the g.list case also I think.

why not just use g.mlist if you want those?
if(!tty) too "tricky"?


Michael:
> For scripting, it would also be nice if it printed like this...
> 
> aspect             
> basin_50K          
> boundary_county_500m
> cfactorbare_1m     
> cfactorgrow_1m     
> elev_lid792_1m
> elev_ned_30m       
> elev_srtm_30m      
> elev_state_500m

and that IS just g.mlist.


Granted g.mlist is just a wrapper around g.list's output, and allowing
g.mlist to work on a -1 preformatted list would make it much less brittle.

e.g. with today's changes we need to test that g.mlist still works.


Paul:
> The only thing I can think that a perline option would be useful would
> be if you wanted 1-column output for this sort of thing - if  we made
> that automatic depending on where stdout was going might that be 
> enough functionality??

$COLUMNS always seems to be problematic for me (rxvt). Hardcode at 76?
see bug #1107   http://intevation.de/rt/webrt?serial_num=1107

Paul:
> If someone wants to add an option to g.list for 1-column output it
> should be possible now (by changing the argument passed to
> G_ls_format()).

Making g.mlist that much simpler, or even redundant.
(so /bin/sh not needed for that functionality)


Hamish




More information about the grass-dev mailing list