[Bulk] Re: The name "grep"
Warren Block
wblock at wonkity.com
Tue Jul 8 04:26:29 UTC 2014
On Tue, 8 Jul 2014, Polytropon wrote:
> On Mon, 7 Jul 2014 13:56:32 -0600 (MDT), Warren Block wrote:
>> There's an ongoing thread in the forums about csh completions. dd is
>> one of them:
>>
>> complete dd 'c/if=/f/' 'c/of=/f/' \
>> 'c/conv=*,/(ascii block ebcdic lcase pareven noerror notrunc osync sparse swab sync unblock)/,' \
>> 'c/conv=/(ascii block ebcdic lcase pareven noerror notrunc osync sparse swab sync unblock)/,' \
>> 'p/*/(bs cbs count files fillcahr ibs if iseek obs of oseek seek skip conv)/='
>
> Thanks, this is really helpful - I made it available system-wide
> in /etc/csh.cshrc's "if ($?prompt) then ... endif" block. It makes
> using the C shell (as a dialog shell) a better experience and still
> surprises me that csh is "that powerful".
The full file is here:
http://www.wonkity.com/~wblock/csh/completions
Some of those are surprisingly helpful, like having make(1) complete
maketargets (is it fetchurl-all or fetch-urlall?). It would be nice to
have 'make -V' complete with make variables, but it takes a fair amount
of processing to pull them out of make output, and I've been trying to
avoid Perl and stick with things that are only available in base.
However, the man page completion one is where the weakness of shell
tools like sed and awk finally got to me and I just used Perl. If
anyone wants to come up with a sh version of that, please share. This
one is very recent.
There are lots more of these that could be useful. Good implementations
for zfs and zpool would be useful. The gpart one just shows help rather
than actually completing, but it's a good reminder.
The ezjail-admin one is another new one I did recently, and has not been
really filled out yet.
These completions make input a lot easier and reduce errors because they
only complete with valid choices. Well, the better-quality ones. We
should encourage people to use completions and add more.
More information about the freebsd-questions
mailing list