nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] switches and smatch

2018-01-28 20:35:20
Agreed, this needs a good cleaning.

I'd like to see a lot of the noddy `-foo sets bool foo, -nofoo clears
it'-case processing in a switch disappear into a central, new,
option-processing routine.

FWIW, I'm fine with that.  But ... as long as we're making a list of
things that we should add to smatch(), here are a few others that would
be helpful.

- We have a lot of commands that call OTHER commands, and a lot of switches
  need to be passed down.  post(8) is the biggest offender here; a lot
  of switches to send(1) are really switches to post(8), and when you add
  a new switch to post(8) you have to add it to send(1) AND whatnow(1)
  and whom(1) and probably one or two more places that I forget.  Being
  able to declare a list of arguments to post(8) that could be used by other
  programs would be a HUGE win.  I think this would require an extension to
  smatch to make it work properly, though.

- Having a common switch that would spit out a list of switches that a
  program takes and _whether or not they take arguments_ would ALSO be
  a huge win.  Why?  Well, let's say you write your own postproc; it turns
  out you need to know which switches take arguments.  Being able to
  get a list of switches and figure out which ones take arguments would
  sure be useful for shell scripting (I realize you could maybe do this
  with the existing -help output, but it would be a bit hairy and I'd
  rather have something easier to use).

--Ken

-- 
Nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>