Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 4 Jan 2015 08:18:28 -0700 (MST)
From:      Warren Block <>
To:        Polytropon <>
Cc:        =?ISO-8859-15?Q?Michael_Gr=FCnewald?= <>,
Subject:   Re: TCSH completion patterns and the pkg command
Message-ID:  <>
In-Reply-To: <>
References:  <> <> <> <> <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On Sun, 4 Jan 2015, Polytropon wrote:
> On Sat, 3 Jan 2015 22:09:32 -0700 (MST), Warren Block wrote:
>> On Sun, 4 Jan 2015, Michael Grünewald wrote:
>>> 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.
>> Some completions here, including some moderate ones for pkg:
> Your completition suggestion was the one I've been
> refering to. It's very nicely done, but of course
> it won't be possible to cope with all imaginable
> combinations of commands and subcommands and their
> specific options. Trying to have all all of them
> autocompleted, plus the many GNU long style options,
> would probably too much for a shell - and the main-
> tainer of the completition list to always keep it
> current and valid. :-)

Yes, and the csh completion syntax is challenging for complex commands. 
An external program can be run to provide completions, and that's 
probably the way to go for the really complex ones.  I've avoided that 
so far, but complex commands with subcommands like git, pkg, zfs, and 
svn might be easier, clearer, or more maintainable to do that way.

> It is, however, debatable in how far this should be
> part of the OS preconfiguration. I'm happy about the
> C shell now having adopted a normal UNIX prompt, but
> I wouldn't assume that everyone on earth would be
> happy with my ls defaults as _his_ defaults:
> 	% grep -i ls /etc/csh.cshrc | less
> 	alias   ls              'ls -FG -D "%Y-%m-%d %H:%M:%S"'
> 	alias   ll              'ls -laFG -D "%Y-%m-%d %H:%M:%S"'
> 	setenv  LSCOLORS        ExGxdxdxCxDxDxBxBxege

Completions are not really the same kind of problem, or at least they 
don't differ because people use the same programs.  I think of them as a 
sort of built-in help for input, helping to make legitimate choices 
rather than what I might remember.  And I would like to see a much 
larger default set of autocompletions.  They make so many commands 
easier to use.
From owner-freebsd-questions@FreeBSD.ORG  Sun Jan  4 15:40:41 2015
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
Received: from (
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by (Postfix) with ESMTPS id 53F3262E
 for <>; Sun,  4 Jan 2015 15:40:41 +0000 (UTC)
Received: from ( [])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client CN "", Issuer "" (not verified))
 by (Postfix) with ESMTPS id 0824764C30
 for <>; Sun,  4 Jan 2015 15:40:40 +0000 (UTC)
Received: from (localhost [])
 by (8.14.9/8.14.9) with ESMTP id t04FeZMF094401
 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO);
 Sun, 4 Jan 2015 08:40:36 -0700 (MST)
Received: from localhost (wblock@localhost)
 by (8.14.9/8.14.9/Submit) with ESMTP id t04FeZ8K094398;
 Sun, 4 Jan 2015 08:40:35 -0700 (MST)
Date: Sun, 4 Jan 2015 08:40:35 -0700 (MST)
From: Warren Block <>
To: Michael <>
Subject: Re: TCSH completion patterns and the pkg command
In-Reply-To: <>
Message-ID: <>
References: <>
 <> <>
User-Agent: Alpine 2.11 (BSF 23 2013-08-11)
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3
 ( []); Sun, 04 Jan 2015 08:40:36 -0700 (MST)
Cc:, Polytropon <>
X-Mailman-Version: 2.1.18-1
Precedence: list
List-Id: User questions <>
List-Unsubscribe: <>, 
List-Archive: <>;
List-Post: <>
List-Help: <>
List-Subscribe: <>, 
X-List-Received-Date: Sun, 04 Jan 2015 15:40:41 -0000

On Sun, 4 Jan 2015, Michael wrote:

> Warren Block wrote:
>> Some completions here, including some moderate ones for pkg:
> Hi Warren, your completions look very interesting! Do you mind if I
> include and rework them with due credit in
> It is distributed under CECILL-B, a BSD-style license.

Sure, my list is a collection anyway.  Many were collected from csh/tcsh 
examples and online sources, some I wrote by myself, and some were 
collaborations.  The original "make" completion that showed all 
available targets was created with help from forum members.  Then 
make(1) changed, and the new one made it much simpler.  Incidentally, 
the completion for "make -V ", which should complete with all available 
make variables, does not yet work.

The sharp-eyed will see a completion for kldreload, which does not 
exist in the wild but is an alias:

   alias kldreload 'kldunload \!* && sleep 0.1 && kldload \!*'

(Used mostly for reloading the VirtualBox kernel module after a 

Some of these are integrated into /usr/share/examples/csh/dot.cshrc. 
There are more completions in /usr/share/examples/tcsh/complete.tcsh, 

Want to link to this message? Use this URL: <>