Skip to content

Commit

Permalink
fix issue #575
Browse files Browse the repository at this point in the history
  • Loading branch information
YuruiHong authored and marlonrichert committed Apr 26, 2023
1 parent 784e3a9 commit 63c22b1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions scripts/.autocomplete.__init__
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ fi
unfunction $funcs[@]:t 2> /dev/null
builtin autoload -UWz $funcs[@]

local -P xdg_data_home=${XDG_DATA_HOME:-~/.local/share}
local -P xdg_data_home=${XDG_DATA_HOME:-$HOME/.local/share}

local -P zsh_data_dir=$xdg_data_home/zsh
[[ -d $zsh_data_dir ]] ||
Expand All @@ -84,7 +84,7 @@ local -P old_logdir=$xdg_data_home/zsh-autocomplete/log
[[ -d $old_logdir ]] &&
zf_rm -fr -- $old_logdir

local -P logdir=${XDG_STATE_HOME:-~/.local/state}/zsh-autocomplete/log
local -P logdir=${XDG_STATE_HOME:-$HOME/.local/state}/zsh-autocomplete/log
[[ -d $logdir ]] ||
zf_mkdir -p -- $logdir
local -Pa older_than_a_week=( $logdir/*(Nmd+7) )
Expand All @@ -97,7 +97,7 @@ typeset -g _autocomplete__log_pty=$logdir/$date.pty.log

typeset -g _autocomplete__ps4=$'%D{%T.%.} %e:%N:%I\t%? %(1_,%_ ,)'

local -P zsh_cache_dir=${XDG_CACHE_HOME:-~/.cache}/zsh
local -P zsh_cache_dir=${XDG_CACHE_HOME:-$HOME/.cache}/zsh
[[ -d $zsh_cache_dir ]] ||
zf_mkdir -pm 0700 $zsh_cache_dir

Expand Down
2 changes: 1 addition & 1 deletion scripts/.autocomplete.compinit
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ compdef() {

typeset -gU FPATH fpath=( ~zsh-autocomplete/functions/completion $fpath[@] )
typeset -g \
_comp_dumpfile=${_comp_dumpfile:-${ZSH_COMPDUMP:-${XDG_CACHE_HOME:-~/.cache}/zsh/compdump}}
_comp_dumpfile=${_comp_dumpfile:-${ZSH_COMPDUMP:-${XDG_CACHE_HOME:-$HOME/.cache}/zsh/compdump}}

if [[ -v _comps[-command-] && $_comps[-command-] != _autocomplete.command ]]; then
zf_rm -f $_comp_dumpfile
Expand Down
2 changes: 1 addition & 1 deletion scripts/.autocomplete.config
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ typeset -g ZLE_SPACE_SUFFIX_CHARS=$'|&<>-+'
builtin zstyle ':completion:*' use-cache yes
builtin zstyle -e ':completion:*' cache-path _autocomplete.config.cache-path
_autocomplete.config.cache-path() {
reply=( "${XDG_CACHE_HOME:-~/.cache}/zsh/compcache" )
reply=( "${XDG_CACHE_HOME:-$HOME/.cache}/zsh/compcache" )
}

builtin zstyle -e ':completion:*' completer _autocomplete.config.completer
Expand Down
2 changes: 1 addition & 1 deletion scripts/.autocomplete.recent-dirs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ zmodload -F zsh/parameter p:commands p:dirstack p:functions

local __=''
builtin zstyle -s :chpwd: recent-dirs-file __ ||
builtin zstyle ':chpwd:*' recent-dirs-file ${XDG_DATA_HOME:-~/.local/share}/zsh/chpwd-recent-dirs
builtin zstyle ':chpwd:*' recent-dirs-file ${XDG_DATA_HOME:-$HOME/.local/share}/zsh/chpwd-recent-dirs
builtin zstyle -s :chpwd: recent-dirs-max __ ||
builtin zstyle ':chpwd:*' recent-dirs-max 0

Expand Down

0 comments on commit 63c22b1

Please sign in to comment.