mirror of
https://github.com/robbyrussell/oh-my-zsh.git
synced 2026-11-25 18:03:03 +01:00
feat(init): keep the zcompdump file in $ZSH_CACHE_DIR
The default dump file moves from `${ZDOTDIR:-$HOME}` to `$ZSH_CACHE_DIR`,
so it no longer clutters the home directory. `ZSH_COMPDUMP` still
overrides the location, and `omz reload` already deletes the dump
wherever it lives. Diagnostics list dump files in both places.
The first shell after updating rebuilds the dump once. Old
`~/.zcompdump-*` files are left in place and can be deleted.
Closes #13406
Co-Authored-By: Monson Shao <holymonson@gmail.com>
This commit is contained in:
1 parent
b5cb2fe952
commit
934576b89b
2 files changed
+5
-4
No files matched your search
+4
-3
@@ -237,9 +237,10 @@ function _omz_diag_dump_one_big_text() {
|
||||
fi
|
||||
builtin echo
|
||||
builtin echo "Zsh compdump files:"
|
||||
local dumpfile dumpfiles
|
||||
command ls -lad $zdotdir/.zcompdump*
|
||||
dumpfiles=( $zdotdir/.zcompdump*(N) )
|
||||
local dumpfile
|
||||
local -U dumpfiles
|
||||
dumpfiles=( $zdotdir/.zcompdump*(N) ${ZSH_COMPDUMP:h}/.zcompdump*(N) )
|
||||
(( $#dumpfiles )) && command ls -lad $dumpfiles
|
||||
if [[ $verbose -ge 2 ]]; then
|
||||
for dumpfile in $dumpfiles; do
|
||||
_omz_diag_dump_echo_file_w_header $dumpfile
|
||||
|
||||
+1
-1
@@ -128,7 +128,7 @@ fi
|
||||
|
||||
# Save the location of the current completion dump file.
|
||||
if [[ -z "$ZSH_COMPDUMP" ]]; then
|
||||
ZSH_COMPDUMP="${ZDOTDIR:-$HOME}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
|
||||
ZSH_COMPDUMP="${ZSH_CACHE_DIR}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
|
||||
fi
|
||||
|
||||
# Resolve the commit $ZSH is checked out at into $REPLY by reading the git
|
||||
|
||||
Reference in new issue
Block a user