Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

When trying to autocomplete a file name for vi, files ending in .log are not listed as options. How can I correct this?

share|improve this question
    
What does the command complete vi output? –  bmk Apr 8 '11 at 8:55

2 Answers 2

I guess you have somewhere (maybe in your ~/.cshrc) specified something like this:

complete vi 'n/*/f:^*.{o,a,dvi,gz,z,Z,log}/'

You should change it (resp. override it), e.g.:

complete vi 'n/*/f:^*.{o,a,dvi,gz,z,Z}/'

Explanation: n means "Next-word completion", * is a glob-pattern to match the beginning of the word on the command line, f means filename, ^*.{o,a,dvi,gz,z,Z} means that the filename must not end with .o, .a, .dvi, .gz, .z or .Z.

share|improve this answer

It is possible that the autocomplete which is ignoring the filenames ending with .log is not specific to vi. It is possible that filenames ending with .log are not being autocompleted for anything.

There is a shell variable in tcsh called fignore, which, according to the man page for tcsh, does the following:

Lists file name suffixes to be ignored by completion.

In my own tcsh configuration and usage, it makes sense for me to ignore certain files with respect to completion capabilities:

% set fignore = (.aux .log .elc .o)
% echo $fignore
.aux .log .elc .o

Assuming, however, that you do have some vi-specific completion capabilities set up to ignore .log, the following command should be able to let you know:

% complete | grep vi
share|improve this answer

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.