Remove unused binaries
This commit is contained in:
parent
160f03d2f2
commit
4bfab68b72
@ -1,41 +0,0 @@
|
|||||||
_zplug-check-interval() {
|
|
||||||
now=$(date +%s)
|
|
||||||
if [ -f "${1}" ]; then
|
|
||||||
last_update=$(cat "${1}")
|
|
||||||
else
|
|
||||||
last_update=0
|
|
||||||
fi
|
|
||||||
interval=$(expr ${now} - ${last_update})
|
|
||||||
echo "${interval}"
|
|
||||||
}
|
|
||||||
|
|
||||||
_zplug-check-for-updates() {
|
|
||||||
if [ -z "${ZPLUG_PLUGIN_UPDATE_DAYS}" ]; then
|
|
||||||
ZPLUG_PLUGIN_UPDATE_DAYS=14
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "${ZPLUG_PLUGIN_UPDATE_FILE}" ]; then
|
|
||||||
ZPLUG_PLUGIN_UPDATE_FILE="${ZPLUG_HOME:-}/.zplug_plugin_lastupdate"
|
|
||||||
fi
|
|
||||||
|
|
||||||
local day_seconds=$(expr 24 \* 60 \* 60)
|
|
||||||
local plugins_seconds=$(expr ${day_seconds} \* ${ZPLUG_PLUGIN_UPDATE_DAYS})
|
|
||||||
|
|
||||||
local last_plugin=$(_zplug-check-interval ${ZPLUG_PLUGIN_UPDATE_FILE})
|
|
||||||
|
|
||||||
if [ ${last_plugin} -gt ${plugins_seconds} ]; then
|
|
||||||
echo "It has been $(expr ${last_plugin} / $day_seconds) days since your zplug plugins were updated"
|
|
||||||
zplug update
|
|
||||||
|
|
||||||
date +%s >! ${ZPLUG_PLUGIN_UPDATE_FILE}
|
|
||||||
zplug clean --force
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
zmodload zsh/system
|
|
||||||
lockfile=${ZPLUG_HOME:-~}/.zplug_autoupdate_lock
|
|
||||||
touch $lockfile
|
|
||||||
if ! which zsystem &> /dev/null || zsystem flock -t 1 $lockfile; then
|
|
||||||
_zplug-check-for-updates
|
|
||||||
command rm -f $lockfile
|
|
||||||
fi
|
|
13
home/.zshrc
13
home/.zshrc
@ -9,14 +9,11 @@ fi
|
|||||||
|
|
||||||
zplug "zplug/zplug", hook-build:'zplug --self-manage'
|
zplug "zplug/zplug", hook-build:'zplug --self-manage'
|
||||||
|
|
||||||
zplug "BurntSushi/ripgrep", from:gh-r, as:command, rename-to:rg
|
zplug "BurntSushi/ripgrep", from:gh-r, as:command, rename-to:rg
|
||||||
zplug "junegunn/fzf-bin", from:gh-r, as:command, rename-to:fzf
|
zplug "junegunn/fzf-bin", from:gh-r, as:command, rename-to:fzf
|
||||||
zplug "r-darwish/topgrade", from:gh-r, as:command, rename-to:topgrade
|
zplug "r-darwish/topgrade", from:gh-r, as:command, rename-to:topgrade
|
||||||
zplug "regclient/regclient", from:gh-r, as:command, rename-to:regctl
|
zplug "sharkdp/bat", from:gh-r, as:command, rename-to:bat
|
||||||
zplug "sharkdp/bat", from:gh-r, as:command, rename-to:bat
|
zplug "stedolan/jq", from:gh-r, as:command, rename-to:jq
|
||||||
zplug "sharkdp/hexyl", from:gh-r, as:command, rename-to:hexyl
|
|
||||||
zplug "stedolan/jq", from:gh-r, as:command, rename-to:jq
|
|
||||||
zplug "wagoodman/dive", from:gh-r, as:command, rename-to:dive
|
|
||||||
|
|
||||||
zplug "b4b4r07/enhancd", use:init.sh
|
zplug "b4b4r07/enhancd", use:init.sh
|
||||||
if zplug check "b4b4r07/enhancd"; then
|
if zplug check "b4b4r07/enhancd"; then
|
||||||
|
Loading…
Reference in New Issue
Block a user