This commit is contained in:
Nikolas Weger 2020-12-08 15:31:16 +01:00
parent 94888758fd
commit 96d1c576a6
6 changed files with 20 additions and 54 deletions

View file

@ -1,28 +1,14 @@
#!/usr/bin/env zsh
#####################
# COMMONS
#####################
autoload colors is-at-least
#########################
# CONSTANT
#########################
BOLD="bold"
NONE="NONE"
#########################
# PLUGIN MAIN
#########################
[[ -z "$DIRENV_HOME" ]] && export DIRENV_HOME="$HOME/.config/direnv"
ZSH_DIRENV_VERSION_FILE=${DIRENV_HOME}/version.txt
#########################
# Functions
#########################
_zsh_direnv_log() {
local font=$1
local color=$2
@ -37,7 +23,7 @@ _zsh_direnv_log() {
}
_zsh_direnv_last_version() {
echo $(curl -s https://api.github.com/repos/direnv/direnv/releases | grep tag_name | head -n 1 | cut -d '"' -f 4)
echo $(curl -s https://api.github.com/repos/direnv/direnv/releases | grep tag_name | head -n 1 | cut -d '"' -f4)
}
_zsh_direnv_download_install() {