zsh filename completion

zsh filename completion

Post by Arto V. Viitan » Tue, 08 Nov 1994 20:46:48



Is there a way to restrict zsh's filename completition on the command basis?
For example, when I type :

       *let<Ctrl-D>

I don't like to see files like letter.dvi or letter.aux, only letter.tex etc.


University Of Tampere,                  X.400: S=av;OU=cs;O=ut;ADMD=fumail;C=fi
Finland                                                  http://www.veryComputer.com/~av/

 
 
 

zsh filename completion

Post by Richard Colem » Wed, 09 Nov 1994 01:37:32


Quote:>   Is there a way to restrict zsh's filename completition on the command basis?
>   For example, when I type :

>      *let<Ctrl-D>

>   I don't like to see files like letter.dvi or letter.aux, only letter.tex etc.

# These will run tex/latex on *.tex files, but if no *.tex file matches what
# we've already typed,  it will complete directories, as the *.tex file may
# not be in the current directory.  Does a similar thing for xdvi/dvips.

compctl -g '*.tex' + -g '*(-/)' tex*amstex amslatex
compctl -g '*.dvi' + -g '*(-/)' xdvi dvips

Richard Coleman


 
 
 

zsh filename completion

Post by Richard Colem » Fri, 11 Nov 1994 05:20:10


Quote:>> Is there a way to restrict zsh's filename completition on the command basis?
>> For example, when I type :

>>        latex let<Ctrl-D>

>> I don't like to see files like letter.dvi or letter.aux, only letter.tex etc.

> Is there an environment variable called `fignore' for zsh?  I would
> suggest checking the man pages for zsh and looking for such a creature.

Yes, zsh uses fignore.  But if you use "fignore=(.dvi .log .aux)",
then these suffixes will be ignored for completion regardless of what
command you are completing this for.  This is not good, because of

xdvi fi<Tab>       # we want to complete to: xdvi file.dvi
*fi<Tab>      # we want to complete to:*file.tex

To complete more intelligently, you should use zsh's programmable
completion facility.  Putting the following in your .zshrc file,

compctl -g '*.tex' tex*
compctl -g '*.dvi' xdvi dvips

Then tex and*will try to complete *.tex files, and
xdvi and dvips will try to complete *.dvi files.

zsh's programmable completion facility has lots of options to
complete in many different ways.

Richard Coleman

 
 
 

zsh filename completion

Post by Jason W Mitche » Fri, 11 Nov 1994 02:58:54



Quote:>Is there a way to restrict zsh's filename completition on the command basis?
>For example, when I type :

>    latex let<Ctrl-D>

>I don't like to see files like letter.dvi or letter.aux, only letter.tex etc.

Is there an environment variable called `fignore' for zsh?  I would
suggest checking the man pages for zsh and looking for such a creature.

-Jason
----------------------------------------------------------------------------

| University of Cincinnati        |  Phone:  (513) 556-6499                |
| Dept. of Aerospace Engineering  | "HUMAN! Your performance was MEDIOCRE! |
|        & Engineering Mechanics  |   Your reward is more PAIN!"           |
| ML 70                           |   - reflections on attitudes in higher |
| Cincinnati, Ohio 45221-0070     |      education...                      |
----------------------------------------------------------------------------

 
 
 

1. Case-insensitive filename completion in zsh?

Hi there

I've scanned all the FAQ's, read all the docs, and looked at the tea
leaves.  Still, I am mystified.  Is it possible to cause zsh to
complete filenames in a case-insensitive manner?  I have in mind
something my buddy Ben does in tcsh - namely if he has a file named
"Kepler" and he types "less kep<TAB>" at the prompt, the shell
completes to "less Kepler".

Brian
--

           "Candy's dandy but liquor is quicker"   - Nash

2. Newbie Question

3. zsh completion plugin; multiple calls to _arguments

4. Best deal for 8mm tapes?

5. Strange new completion behavior in zsh

6. Weird inetd behavior

7. zsh completion in subdirectories

8. Storm Linux Installation Problem

9. How do I make zsh ignore CVS directory during completion?

10. zsh tab completion

11. ZSH - compctl, order of completion

12. Zsh Completion: show files in completed directory

13. Q: Zsh and programmable completion