Skip to content

Commit

Permalink
fix: java zulu, issues with AWS config
Browse files Browse the repository at this point in the history
  • Loading branch information
bklebe committed Oct 29, 2024
1 parent 62db4cc commit cb90479
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 204 deletions.
5 changes: 3 additions & 2 deletions .config/mise/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,16 @@ go = "1.21.3"
poetry = "1.8.3"
elixir = "1.17.2-otp-27"
erlang = "27.0"
java = "liberica-javafx-22.0.1+10"
terraform = "1.4.2"
shellcheck = "0.10.0"
"pipx:erikbern/git-of-theseus" = "latest"
node = "22.7.0"
"cargo:cargo-binstall" = "1.6.9"
"cargo:diffedit3" = "0.4.0"
python = "3.13.0"
usage = "0.3.0"
java = "zulu-23.30.13"
shellcheck = "0.10.0"
spring-boot = "3.3.5"

[settings]
experimental = true
3 changes: 0 additions & 3 deletions .config/zsh/.zshenv
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ export HISTFILE="$XDG_STATE_HOME"/zsh/history

export ANDROID_HOME="$XDG_DATA_HOME"/android

export AWS_SHARED_CREDENTIALS_FILE="$XDG_CONFIG_HOME"/aws/credentials
export AWS_CONFIG_FILE="$XDG_CONFIG_HOME"/aws/config

export CABAL_CONFIG="$XDG_CONFIG_HOME"/cabal/config
export CABAL_DIR="$XDG_DATA_HOME"/cabal

Expand Down
3 changes: 1 addition & 2 deletions .config/zsh/.zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

zmodload zsh/zprof

eval "$(mise activate zsh)"
# eval "$(mise activate zsh)"

zstyle ':completion:*' cache-path "$XDG_CACHE_HOME"/zsh/zcompcache
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}'
Expand Down Expand Up @@ -81,4 +81,3 @@ install_nix_darwin() {

eval "$(starship init zsh)"
eval "$(direnv hook zsh)"

47 changes: 47 additions & 0 deletions .config/zsh/functions/_mise
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#compdef mise
local curcontext="$curcontext"

# caching config
_usage_mise_cache_policy() {
if [[ -z "${lifetime}" ]]; then
lifetime=$((60*60*4)) # 4 hours
fi
local -a oldp
oldp=( "$1"(Nms+${lifetime}) )
(( $#oldp ))
}

_mise() {
typeset -A opt_args
local curcontext="$curcontext" spec cache_policy

if ! command -v usage &> /dev/null; then
echo >&2
echo "Error: usage CLI not found. This is required for completions to work in mise." >&2
echo "See https://usage.jdx.dev for more information." >&2
return 1
fi

zstyle -s ":completion:${curcontext}:" cache-policy cache_policy
if [[ -z $cache_policy ]]; then
zstyle ":completion:${curcontext}:" cache-policy _usage_mise_cache_policy
fi

if ( [[ -z "${_usage_mise_spec:-}" ]] || _cache_invalid _usage_mise_spec ) \
&& ! _retrieve_cache _usage_mise_spec;
then
spec="$(mise usage)"
_store_cache _usage_mise_spec spec
fi

_arguments "*: :(($(usage complete-word --shell zsh -s "$spec" -- "${words[@]}" )))"
return 0
}

if [ "$funcstack[1]" = "_mise" ]; then
_mise "$@"
else
compdef _mise mise
fi

# vim: noet ci pi sts=0 sw=4 ts=4
197 changes: 0 additions & 197 deletions .config/zsh/functions/_poetry

This file was deleted.

0 comments on commit cb90479

Please sign in to comment.