Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix issue #575 #579

Merged
merged 1 commit into from
Apr 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading