Update zsh config and plugins
This commit is contained in:
parent
187bd24560
commit
16e6c27b0f
0
home/.zsh/.linkdir
Normal file
0
home/.zsh/.linkdir
Normal file
12
home/.zsh/cmd/kp.sh
Executable file
12
home/.zsh/cmd/kp.sh
Executable file
@ -0,0 +1,12 @@
|
||||
### PROCESS
|
||||
# mnemonic: [K]ill [P]rocess
|
||||
# show output of "ps -ef", use [tab] to select one or multiple entries
|
||||
# press [enter] to kill selected processes.
|
||||
# press [escape] to exit.
|
||||
|
||||
pid=$(ps -ef | sed 1d | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[kill:process]'" | awk '{print $2}')
|
||||
|
||||
if [ "x$pid" != "x" ]
|
||||
then
|
||||
echo $pid | xargs kill -${1:-9}
|
||||
fi
|
18
home/.zsh/cmd/vmc.sh
Executable file
18
home/.zsh/cmd/vmc.sh
Executable file
@ -0,0 +1,18 @@
|
||||
### ASDF
|
||||
# uninstall multiple languages at once, async
|
||||
# mnemonic [V]ersion [M]anager [C]lean
|
||||
|
||||
lang=${1}
|
||||
|
||||
if [[ -z $lang ]]; then
|
||||
lang=$(asdf plugin-list | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[asdf:clean]'")
|
||||
fi
|
||||
|
||||
if [[ $lang ]]; then
|
||||
for lng in $(echo $lang); do
|
||||
for version in $(asdf list $lng | sort -nrk1,1 | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[asdf:${lng}:clean]'")
|
||||
do asdf uninstall $lng $version
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
25
home/.zsh/cmd/vmi.sh
Executable file
25
home/.zsh/cmd/vmi.sh
Executable file
@ -0,0 +1,25 @@
|
||||
### ASDF
|
||||
# install multiple languages at once, async
|
||||
# mnemonic [V]ersion [M]anager [I]nstall
|
||||
|
||||
lang=${1}
|
||||
asdf plugin-list-all &>/dev/null 2>&1
|
||||
|
||||
if [[ -z $lang ]]; then
|
||||
lang=$(asdf plugin-list-all | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[asdf:install]'")
|
||||
fi
|
||||
|
||||
if [[ $lang ]]; then
|
||||
for lng in $(echo $lang); do
|
||||
if [[ -z $(asdf plugin-list | rg $lng) ]]; then
|
||||
asdf plugin-add $lng
|
||||
else
|
||||
asdf plugin-update $lng
|
||||
fi
|
||||
|
||||
for version in $(asdf list-all $lng | sort -nrk1,1 | eval "fzf ${FZF_DEFAULT_OPTS} -m --header='[asdf:${lng}:install]'")
|
||||
do asdf install $lng $version
|
||||
done
|
||||
done
|
||||
fi
|
||||
|
36
home/.zshrc
36
home/.zshrc
@ -2,17 +2,19 @@
|
||||
|
||||
if [[ ! -d ~/.zplug ]]; then
|
||||
git clone https://github.com/zplug/zplug ~/.zplug
|
||||
source ~/.zplug/init.zsh && zplug update --self
|
||||
source ~/.zplug/init.zsh && zplug update
|
||||
else
|
||||
source ~/.zplug/init.zsh
|
||||
fi
|
||||
source ~/.zplug/init.zsh
|
||||
|
||||
zplug "zplug/zplug", hook-build:'zplug --self-manage'
|
||||
|
||||
zplug "junegunn/fzf-bin", from:gh-r, as:command, rename-to:fzf
|
||||
zplug "stedolan/jq", from:gh-r, as:command, rename-to:jq
|
||||
zplug "akavel/up", from:gh-r, as:command, rename-to:up
|
||||
zplug "sharkdp/bat", from:gh-r, as:command, rename-to:bat
|
||||
zplug "wagoodman/dive", from:gh-r, as:command, rename-to:dive
|
||||
zplug "wagoodman/dive", from:gh-r, as:command, rename-to:dive
|
||||
zplug "stedolan/jq", from:gh-r, as:command, rename-to:jq
|
||||
zplug "sharkdp/bat", from:gh-r, as:command, rename-to:bat
|
||||
zplug "junegunn/fzf-bin", from:gh-r, as:command, rename-to:fzf
|
||||
zplug "genuinetools/reg", from:gh-r, as:command, rename-to:reg
|
||||
zplug "BurntSushi/ripgrep", from:gh-r, as:command, rename-to:rg
|
||||
|
||||
zplug "b4b4r07/enhancd", use:init.sh
|
||||
if zplug check "b4b4r07/enhancd"; then
|
||||
@ -20,27 +22,29 @@ if zplug check "b4b4r07/enhancd"; then
|
||||
export ENHANCD_DOT_SHOW_FULLPATH=1
|
||||
fi
|
||||
|
||||
zplug "lib/completion", from:oh-my-zsh
|
||||
zplug "lib/directories", from:oh-my-zsh
|
||||
zplug "lib/grep", from:oh-my-zsh
|
||||
zplug "lib/history", from:oh-my-zsh
|
||||
zplug "lib/key-bindings", from:oh-my-zsh
|
||||
zplug "lib/termsupport", from:oh-my-zsh
|
||||
zplug "lib/key-bindings", from:oh-my-zsh
|
||||
zplug "lib/history", from:oh-my-zsh
|
||||
zplug "lib/grep", from:oh-my-zsh
|
||||
zplug "lib/directories", from:oh-my-zsh
|
||||
zplug "lib/completion", from:oh-my-zsh
|
||||
|
||||
zplug "plugins/asdf", from:oh-my-zsh
|
||||
zplug "plugins/bundler", from:oh-my-zsh
|
||||
zplug "plugins/docker", from:oh-my-zsh
|
||||
zplug "plugins/git", from:oh-my-zsh
|
||||
zplug "plugins/docker", from:oh-my-zsh
|
||||
zplug "plugins/bundler", from:oh-my-zsh
|
||||
zplug "plugins/asdf", from:oh-my-zsh
|
||||
|
||||
zplug "zsh-users/zsh-completions"
|
||||
zplug "zsh-users/zsh-syntax-highlighting", defer:2
|
||||
|
||||
zplug "~/.zsh/cmd", from:local, use:'(*).sh', as:command, rename-to:'$1'
|
||||
zplug "~/.zsh/themes", from:local, use:cheetah.zsh-theme, as:theme
|
||||
|
||||
if [[ $OSTYPE == *darwin* ]]; then
|
||||
zplug "plugins/osx", from:oh-my-zsh
|
||||
zplug "plugins/pass", from:oh-my-zsh
|
||||
fi
|
||||
|
||||
zplug "~/.zsh/themes", from:local, use:cheetah.zsh-theme, as:theme
|
||||
[ -s "$HOME/.zsh.local" ] && source $HOME/.zsh.local
|
||||
|
||||
zplug check || zplug install
|
||||
|
Loading…
Reference in New Issue
Block a user