mirror of
https://github.com/DictXiong/dotfiles.git
synced 2024-11-24 13:56:59 +08:00
Dev (#2)
* dfs reset; create_symlink check * dfs cd * add plugin extrace and autojump * remove autojump * enable ZSH_THEME
This commit is contained in:
parent
3b3728e324
commit
4fe4698bd2
22
.zshrc2
22
.zshrc2
|
@ -42,12 +42,13 @@ fi
|
||||||
source "$ANTIGEN"
|
source "$ANTIGEN"
|
||||||
antigen use oh-my-zsh
|
antigen use oh-my-zsh
|
||||||
# enable plugins
|
# enable plugins
|
||||||
antigen bundle git
|
|
||||||
antigen bundle command-not-found
|
antigen bundle command-not-found
|
||||||
antigen bundle thefuck
|
|
||||||
antigen bundle fzf
|
|
||||||
antigen bundle docker
|
antigen bundle docker
|
||||||
|
antigen bundle extract
|
||||||
|
antigen bundle fzf
|
||||||
|
antigen bundle git
|
||||||
antigen bundle ripgrep
|
antigen bundle ripgrep
|
||||||
|
antigen bundle thefuck
|
||||||
antigen bundle tmux
|
antigen bundle tmux
|
||||||
antigen bundle ufw
|
antigen bundle ufw
|
||||||
antigen bundle z
|
antigen bundle z
|
||||||
|
@ -55,7 +56,7 @@ antigen bundle https://gitee.com/dictxiong/zsh-syntax-highlighting
|
||||||
antigen bundle https://gitee.com/dictxiong/zsh-completions
|
antigen bundle https://gitee.com/dictxiong/zsh-completions
|
||||||
antigen bundle https://gitee.com/dictxiong/zsh-autosuggestions
|
antigen bundle https://gitee.com/dictxiong/zsh-autosuggestions
|
||||||
# select theme
|
# select theme
|
||||||
antigen theme ys
|
antigen theme ${ZSH_THEME:-ys}
|
||||||
# apply
|
# apply
|
||||||
antigen apply
|
antigen apply
|
||||||
# end of antigen config
|
# end of antigen config
|
||||||
|
@ -65,8 +66,17 @@ export DOTFILES=$( cd "$( dirname "${BASH_SOURCE[0]:-${(%):-%x}}" )" && pwd )
|
||||||
dfs()
|
dfs()
|
||||||
{
|
{
|
||||||
case $1 in
|
case $1 in
|
||||||
update ) (cd "$DOTFILES" && env git pull) ;;
|
update ) (cd "$DOTFILES" && git pull) ;;
|
||||||
* ) echo "unknown command \"$1\". available: update" ;;
|
reset )
|
||||||
|
antigen reset 1> /dev/null
|
||||||
|
rm -rf $HOME/.antigen
|
||||||
|
$DOTFILES/install.sh -r
|
||||||
|
dfs update
|
||||||
|
$DOTFILES/install.sh -i
|
||||||
|
echo 'Done. Please open a new shell to see the changes.'
|
||||||
|
;;
|
||||||
|
cd ) cd "$DOTFILES" ;;
|
||||||
|
* ) echo "unknown command \"$1\". available: update, reset, cd" ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -141,6 +141,9 @@ create_symlink()
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
if [ -f "$dest" ]; then
|
if [ -f "$dest" ]; then
|
||||||
|
if [ "$(readlink $dest)" -ef "$src" ]; then
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
fmt_warning "\"$dest\" already exists! stat output:"
|
fmt_warning "\"$dest\" already exists! stat output:"
|
||||||
echo ----------
|
echo ----------
|
||||||
stat $dest
|
stat $dest
|
||||||
|
@ -154,6 +157,7 @@ create_symlink()
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
ln -s $src $dest
|
ln -s $src $dest
|
||||||
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
delete_link_if_match()
|
delete_link_if_match()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user