tcsh - Completion

hello dear members,

I've left bash and decided to give a chance to the FreeBSD standard shell, tcsh. as I can see, for the daily routine work the tcsh is sufficient and noticeably faster, there is almost no reason for using bash instead. but there are still some little details I got used to when I worked under bash, which I couldn't find under tcsh yet, for example, when I use tab-completion under bash and navigate through directories, typing on [tab] when doing (e.g) "cd /usr/ports/x11/", I get the message "Display all 500 possibilities? (y or n)"; this is very sensible, because otherwise it would take a long time to display all those posibilities, and this would be annoying. but under tcsh there is apparently no limit set for displaying, in spite of the big number, everything is being displayed when using [tab], and this takes a lot of time!

is it possible to set somewhere a limit for the number of displayed contents when using [tab]-completion under tcsh?

cheers!
 
Read the man page (man cshsh). :) Search (press / to enter search mode) for the word completion. :) It's one line added to your .cshrc file.
 
hi phoenix,

thank you for your advice; if you mean "set autolist" by "one line", so I've to tell that this has been already set before. once again: the completion works great - this is not the main problem; the problem is, when you type "cd /usr/ports/x11/" and then type [TAB] to display the files, it takes a lot od time to load. it would be nice, if there exists a way to set a limit for how many files can be displayed at most - as it exists in bash; for example, when I try to display the files by the same way in bash - if there are (e.g.) more than 500 files - it asks me "Display all 500 possibilities? (y or n)". is it possible to get the same in (t)csh?

thank you!
 
Try setting listmax and/or listmaxrows:

listmax (+)
The maximum number of items which the list-choices editor command will list without asking first.

listmaxrows (+)
The maximum number of rows of items which the list-choices editor command will list without asking first.
 
Wolfram. Not to suggest trying something other than tcsh. tcsh is a great shell. If you really want to see a clever and useful completion system look into zsh. zsh has a very mature completion system and can complete even over ssh with scp into another machine. It also has csh features like shell history manipulation.

Just a suggestion. not looking to derail the thread. I <3 all the unix shells equally that don't start with the letter b. =)
 
Back
Top