How to make auto complete available for directories in cdpath for tcsh?

10

2

I just learned the trick for setting up cdpath in tcsh and it looks pretty useful.

However, it seems that auto-complete of sub-folder names doesn't come with it. Is there any trick available on that? It'd be really cool since I'm entering certain directories a lot.

I am using tcsh 6.14.00 (Astron).

Derek

Posted 2013-11-08T23:13:59.077

Reputation: 229

Do you have these in your .cshrc? "set autolist = ambiguous" and "set complete = enhance" ? – Hennes – 2013-11-08T23:19:11.730

Thanks for the reply, i just added these two into .cshrc, however seems it's not working. – Derek – 2013-11-08T23:27:22.673

Did you relog, source the file or start a new csh? (e.g. exec csh)? Which version of csh are you using? – Hennes – 2013-11-08T23:32:51.400

Yes, I did that. I'm not sure about the csh version, how can I tell? – Derek – 2013-11-09T06:25:29.013

Try csh --version. It probably yields a line similar to this one: "tcsh 6.17.00 (Astron) 2009-07-10 (unknown-unknown-FreeBSD) options wide,nls,dl,al,kan,sm,rh,color,filec" – Hennes – 2013-11-09T14:42:04.533

Sorry to get back so late. The output of this cmd is tcsh 6.14.00 (Astron) 2005-03-25 (x86_64-unknown-linux) options wide,nls,dl,al,kan,sm,rh,color,filec – Derek – 2013-11-12T23:50:40.223

1

If you still do not have an answer in a few days you might consider a bounty or moving (not cross posting) the question to Linux and unix. They have some similar questions which did get an answer.

– Hennes – 2013-11-14T06:46:30.437

Thanks @Hennes for the tip. Do you know how exactly do I move a question instead of asking there again? – Derek – 2013-11-15T23:07:54.523

You can use the [flag] link to ask moderator assistance. They can (sometimes? always?) migrate the post. As for the possible delay for an answer: 1) Nobody knows. 2) or it is not possible (likely since it would mean searching for autocompletes in your whole cdpath which is resource intensive) 3) or people are not that interested in the answer (then again, I am curious if it is possible and I doubt that I am the only one). – Hennes – 2013-11-15T23:15:31.507

I just asked a mod. As long as the question is younger than 60 days they can migrate it. – Hennes – 2013-11-16T00:25:58.773

Answers

1

I'm using tcsh 6.18.01-3 under Debian Jessie and file complete is available with the TAB key in the same way that its available under bash.

Can you upgrade to the newer version?

Also: https://kb.iu.edu/d/aids suggests that it should just work with TAB for you. Don't use ESC key.

Eamonn Kenny

Posted 2013-11-08T23:13:59.077

Reputation: 141

0

Try this in .tcshrc:

set autoexpand

as per https://unix.stackexchange.com/questions/19256/tab-autocompletion-and-history-in-tcsh

or

set expand-glob

for just files

Another source: http://linux.die.net/man/1/tcsh

rfportilla

Posted 2013-11-08T23:13:59.077

Reputation: 425