TCSH completion patterns and the pkg command

Michael Grünewald michipili at gmail.com
Sat Jan 3 23:04:07 UTC 2015


Polytropon wrote:
> The C shell is the system's _default_ interactive shell.
> This statement does not carry any judgmental statement. :-)

I was not sure any more about this, so I went lazy and blurry. :)

> In my opinion, this is possible, but not easy. I'd say
> it's easier to teach the C shell the completition rules
> for the commands you want.

I am not sure it easier to do so.  If we consider the special
example of git:

 * We have several possible sort of completion lists:
   remotes, branch names, tags, and commit hashs — the latter
   are commonly used for git commit --fixup et al.
 * We have a lot of subcommands having many options whose names
   sometimes collide and do not always use the same arguments
   (e.g. git diff -b and git checkout -b).

It seems to me that it is very hard to propose pertinent
completions for git if we do not take the current subcommand
into account — but frankly, I did not try very hard.
-- 
Michael



More information about the freebsd-questions mailing list