Opened 10 years ago

Closed 10 years ago

#2317 closed defect (fixed)

G7: t.* modules suboptimal flag name -h, change to -c

Reported by: neteler Owned by: grass-dev@…
Priority: normal Milestone: 7.0.0
Component: Temporal Version: svn-releasebranch70
Keywords: interface, flags Cc:
CPU: Unspecified Platform: Unspecified


The temporal modules use a suboptimal flag name (raising confusion between -h versus --h). This affects several t.* modules:

  -h   Print the column names as first row
 --h   Print usage summary

IMHO it is better to invert this behaviour as to "-c" in

  -c   Do not include column names in output

unless there is a strong need to NOT put the column names by default (which I think would be helpful for the user).

Change History (3)

comment:1 by wenzeslaus, 10 years ago

Keywords: interface flags added

I'm not sure but I agree, just reading a command

t.rast.univar tempmean where="start_time < '2010-01-01'" -h

and wondering if -h is a mistake or not and then I remembered this ticket.

The reasons why I'm not sure are:

  • -c as a column to *not* adding columns (general problem of many flags)
  • what should be the default, user friendly output or parseable output? (consider e.g. g.mlist and g.list)

Anyway, I'm for the change. (I cannot do it now but I guess it is easy once approved.)

comment:2 by huhabla, 10 years ago

Please try r61071.

I have changed the -h flag into -s to suppress column name printing in several modules. Hence, column names are printed by default. Exception is t.list that now has a -c flag to print column names.

comment:3 by neteler, 10 years ago

Resolution: fixed
Status: newclosed

Thanks, closing.

Note: See TracTickets for help on using tickets.