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

Re: force overwrite in completions



On 2009-02-18 at 09:14 +0100, Arkadiusz Miskiewicz wrote:
> I'm using zsh on a system which shares $HOME between two separate servers and 
> when using both at the same time, switching to root at these (and so on) I 
> sometimes get a question from mv asking me if I want to overwrite a file over 
> and over.
> 
> This patch just forces such overwrite.

If the hosts have different sets of binaries installed so that
completion differs between the two, you're losing your caching as each
host keeps blowing away the other's cache.

I use this, both for NFS environment and non-NFS where I tend to play
with different versions of zsh:

if is-at-least 4.2.0; then autoload -Uz compinit ; else autoload -U compinit ; fi
[[ -d "${ZDOTDIR:-$HOME}/.zcompdumps" ]] || mkdir -m 0700 -p "${ZDOTDIR:-$HOME}/.zcompdumps"
compinit -u -d "${ZDOTDIR:-$HOME}/.zcompdumps/${HOST%%.*}-$ZSH_VERSION"

I've autoloaded is-at-least before this.

Regards,
-Phil



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