Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: "rehash" each time a new program is installed?



On Thu, Feb 15, 2001 at 07:31:09PM +0000, Bart Schaefer wrote:
> On Feb 15,  6:57pm, Louis-David Mitterrand wrote:
> } Subject: "rehash" each time a new program is installed?
> }
> } I find myself having to run "rehash" to get zsh to recognize the
> } presence of a new executable in the PATH. bash doesn't seem to have that
> } requirement. Is there an option to get that behavior in zsh?
> 
> You probably want "setopt nohashdirs".  If that doesn't do it, "nohashcmds".
> 
> } Also, how could I have zsh not list "CVS" directories when completing
> } paths? I tried fignore but it doesn't work.
> 
> I don't immediately recall any way to ignore intermediate directories in
> a path.  It's probably possible using styles in 3.1.6 and later, but the
> only way for 3.0.8 would be to write a "compctl -K" function and attach
> it to the specific commands for which you don't want to see CVS.

I am using debian's 3.1.9.dev8-2 package, so I'll check the styles.

> } Oh, and a last one ;) Is it possible to "fignore" a file except when
> } it's the only completion candidate (considering the typed string e.g.)?
> 
> That should happen already:
> 
> fignore <S> <Z> (FIGNORE <S>)
>      An array (colon separated list) containing the suffixes of files
>      to be ignored during filename completion.  However, if the
>      completion generates only files which would match if this variable
>      would be ignored, than these files are completed anyway.

>From my .zshrc:

> autoload -U compinit
> compinit
> zstyle ':completion:*' completer _complete
> zstyle ':completion:*' file-sort modification
> zstyle ':completion:*' group-name ''
> zstyle ':completion:*' matcher-list ''
> zstyle ':completion:*' squeeze-slashes true
> zstyle ':completion:*' verbose true
> zstyle :compinstall filename '/home/ldm/.zsh/.zshrc'
> autoload -U zfinit
> zfinit
> 
> fignore=(.o \~ .old .bak .orig CVS)

But when trying to complete "vim auction.sql.orig" I find myself banging
like crazy on the TAB key without any reaction from zsh. In desperation
I add a * to my prefix and _then_ it completes.

Thanks,

-- 
 HIPPOLYTE: Dans le fond des forêts votre image me suit ;
            La lumière du jour, les ombres de la nuit,
            Tout retrace à mes yeux les charmes que j'évite,
            Tout vous livre à l'envi le rebelle Hippolyte.
                                          (Phèdre, J-B Racine, acte 2, scène 2)



Messages sorted by: Reverse Date, Date, Thread, Author