nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] switches and smatch

2018-01-29 05:43:35
Hi Paul,

I've made a note of your and Ken's suggestions.

http://blog.llvm.org/2017/09/clang-bash-better-auto-completion-is.html

Having every program, clang, nmh, vim, etc., implement --autocomplete
seems a poor solution.  The bash script they provide has knowledge of
some of clang's options so it can augment the request, so a generic
`--autocomplete' using script is still required.  And `--autocomplete'
looks like the `AutoComplete' mail header to nmh.  :-)

I'm surprised they didn't plump for Ken's idea of simply printing a
well-defined option definition and have a generic script mangle that
into a shell's completion system, but the need to spot `-cc1', for
example, and alter behaviour probably stopped that.

We already install /etc/nmh/bash_completion_nmh.  (I'm guessing zsh
users can make use of that too?  Oliver?)  That seems good enough;  it's
built from man/mh-chart.man which is in turn build from the other man
pages.  If bash_completion_nmh is faulty then that's something that
needs attention.

An option to dump an nmh program's options so a script can build upon
them could be useful.  Or should the script just insist on its first,
e.g. «pickall -literal +foo +bar -- -sub 'not.*a[regexp]'».

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy

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

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