1
When trying to autocomplete a file name for vi, files ending in .log are not listed as options. How can I correct this?
1
When trying to autocomplete a file name for vi, files ending in .log are not listed as options. How can I correct this?
1
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
.
1
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
What does the command
complete vi
output? – bmk – 2011-04-08T08:55:32.157