zshoh-my-zsh

I have multiple files of `.zcompdump`, why do I have multiple files of these?


I have multiple files of .zcompdump*.

.rw-r--r--   47k myuser 13 Jul 10:02  .zcompdump
.rw-r--r--   47k myuser 14 Jul 16:52  .zcompdump-MacBook Pro (2)-5.7.1
.rw-r--r--   47k myuser  4 Jun  9:32  .zcompdump-MacBook Pro-5.7.1
.rw-r--r--   36k myuser  3 Jul 11:07  .zcompdump.macbook-pro-2.lan.54221

Which one of them do zsh actually use? Can I clear out some of them or?


Solution

  • Because the compinit mechanism of zsh creates the filename depending on some environment variable, here $HOST.

    It's safe to delete them, but they will be recreated unless you add -D to compinit line in your zsh config

    https://github.com/wurmlab/oswitch/issues/41

    They are used to speed up the completion mechanism.
    You can delete them and let it recreate the one you need.