Re: [Bulk] Re: The name "grep"

看板FB_questions作者時間11年前 (2014/07/08 12:32), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串9/9 (看更多)
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. _______________________________________________ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
文章代碼(AID): #1JktH2R0 (FB_questions)
討論串 (同標題文章)
文章代碼(AID): #1JktH2R0 (FB_questions)