Skip to content
This repository

Create the zcompdump based on version and host #1829

Merged
merged 1 commit into from 10 months ago

3 participants

Christian Höltje Bigfish Robby Russell
Christian Höltje
docwhat commented

This will prevent lots of subtle problems that happen when people upgrade ZSH
or use NFS mounted home directories.

The ZSH_COMPDUMP variable can also be used to implement zcompile and other
fun features in the future.

Christian Höltje Create the zcompdump based on version and host
This will prevent lots of subtle problems that happen when
people upgrade ZSH or use NFS mounted home directories.

The ZSH_COMPDUMP variable can also be used to implement `zcompile`
and other fun features in the future.
d2fe03d
Christian Höltje

@robbyrussell If we included this change, it should prevent a vast majority of the issues that have to do with the .zcompdump file being for the wrong version of ZSH.

This should cut down on filed issues somewhat. e.g. #518 #630 #745 #316 #1157 ... etc. etc.

Aleksey cruser42 referenced this pull request in sorin-ionescu/prezto
Closed

windows 8 cygwin prezto start printout bug #410

Christian Höltje

@robbyrussell Any interest in this? Is there some change I should make so you'd accept it?

Robby Russell robbyrussell merged commit 475fb3a into from
Bigfish

what's this for? caused #2155

Christian Höltje docwhat deleted the branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

May 17, 2013
Christian Höltje Create the zcompdump based on version and host
This will prevent lots of subtle problems that happen when
people upgrade ZSH or use NFS mounted home directories.

The ZSH_COMPDUMP variable can also be used to implement `zcompile`
and other fun features in the future.
d2fe03d
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 12 additions and 2 deletions. Show diff stats Hide diff stats

  1. +12 2 oh-my-zsh.sh
14 oh-my-zsh.sh
@@ -38,10 +38,20 @@ for plugin ($plugins); do
38 38 fi
39 39 done
40 40
  41 +# Figure out the SHORT hostname
  42 +if [ -n "$commands[scutil]" ]; then
  43 + # OS X
  44 + SHORT_HOST=$(scutil --get ComputerName)
  45 +else
  46 + SHORT_HOST=${HOST/.*/}
  47 +fi
  48 +
  49 +# Save the location of the current completion dump file.
  50 +ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
  51 +
41 52 # Load and run compinit
42 53 autoload -U compinit
43   -compinit -i
44   -
  54 +compinit -i -d "${ZSH_COMPDUMP}"
45 55
46 56 # Load all of the plugins that were defined in ~/.zshrc
47 57 for plugin ($plugins); do

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.