mirror of
https://github.com/DictXiong/dotfiles.git
synced 2026-11-23 20:38:16 +08:00
Dev (#6)
* .gitconfig; tools/alpine.sh; mkdir -p when install; restruct ubuntu.sh * spelling * tpm requires make; set-tz; lemonbench * ANTIGEN_EXCLUDE * dfs force-update
This commit is contained in:
37
.zshrc2
37
.zshrc2
@@ -42,19 +42,27 @@ fi
|
||||
source "$ANTIGEN"
|
||||
antigen use oh-my-zsh
|
||||
# enable plugins
|
||||
antigen bundle command-not-found
|
||||
antigen bundle docker
|
||||
antigen bundle extract
|
||||
antigen bundle fzf
|
||||
antigen bundle git
|
||||
antigen bundle ripgrep
|
||||
antigen bundle thefuck
|
||||
antigen bundle tmux
|
||||
antigen bundle ufw
|
||||
antigen bundle z
|
||||
antigen bundle https://gitee.com/dictxiong/zsh-syntax-highlighting
|
||||
antigen bundle https://gitee.com/dictxiong/zsh-completions
|
||||
antigen bundle https://gitee.com/dictxiong/zsh-autosuggestions
|
||||
antigen_plugins=( \
|
||||
"command-not-found" \
|
||||
"docker" \
|
||||
"extract" \
|
||||
"fzf" \
|
||||
"git" \
|
||||
"ripgrep" \
|
||||
"thefuck" \
|
||||
"tmux" \
|
||||
"ufw" \
|
||||
"z" \
|
||||
"https://gitee.com/dictxiong/zsh-syntax-highlighting" \
|
||||
"https://gitee.com/dictxiong/zsh-completions" \
|
||||
"https://gitee.com/dictxiong/zsh-autosuggestions" \
|
||||
)
|
||||
for i in ${antigen_plugins[*]}
|
||||
do
|
||||
if [[ -z $ANTIGEN_EXCLUDE || ! $i =~ $ANTIGEN_EXCLUDE ]]; then
|
||||
antigen bundle $i
|
||||
fi
|
||||
done
|
||||
# select theme
|
||||
antigen theme ${ZSH_THEME:-ys}
|
||||
# apply
|
||||
@@ -67,6 +75,7 @@ dfs()
|
||||
{
|
||||
case $1 in
|
||||
update ) (cd "$DOTFILES" && git pull) ;;
|
||||
force-update ) (cd "$DOTFILES" && git fetch --all && git reset --hard origin/main && git pull) ;;
|
||||
reset )
|
||||
antigen reset 1> /dev/null
|
||||
rm -rf $HOME/.antigen
|
||||
@@ -76,7 +85,7 @@ dfs()
|
||||
echo 'Done. Please open a new shell to see the changes.'
|
||||
;;
|
||||
cd ) cd "$DOTFILES" ;;
|
||||
* ) echo "unknown command \"$1\". available: update, reset, cd" ;;
|
||||
* ) echo "unknown command \"$1\". available: update, force-update, reset, cd" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user