-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: java zulu, issues with AWS config
- Loading branch information
Showing
5 changed files
with
51 additions
and
204 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.