Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to make a tcsh completion that completes with both a relative directory (ie p/*/d/), or the output of a command (ie p/*/'completionterms'/). Is this possible? Looking at the tcsh man page it's not obvious.

And before anyone says use bash, I need to support both (bash was easy ;-).

For example, say I have this directory tree:

|-- dirone
|   `-- subdir
`-- dirtwo

And completionterms prints out:

desiredout outputone outputtwo

What I'm after is a completion such that both of these would get added. Thus:

$ commandtocomplete <tab>
dirone/ dirtwo/ desiredout outputone outputtwo
$ commandtocomplete d<tab>
dirone/ dirtwo/ desiredout
$ commandtocomplete dirone/s<tab>
$ commandtocomplete dirone/subdir
share|improve this question
I don’t understand the question. Can you please try to explain in a little more detail what you want to do (and what you want the system to do)? – Scott Apr 2 '13 at 15:09
@Scott: I've edited the question to include an example of what I'm after, hopefully it helps. – spookypeanut Apr 3 '13 at 9:13

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.