mirror of
https://github.com/DictXiong/dotfiles.git
synced 2024-11-28 05:57:00 +08:00
parent
72b7b60449
commit
7a7526d184
15
.zshrc2
15
.zshrc2
|
@ -59,3 +59,18 @@ antigen theme ys
|
||||||
# apply
|
# apply
|
||||||
antigen apply
|
antigen apply
|
||||||
# end of antigen config
|
# end of antigen config
|
||||||
|
|
||||||
|
# functions
|
||||||
|
export DOTFILES=$( cd "$( dirname "${BASH_SOURCE[0]:-${(%):-%x}}" )" && pwd )
|
||||||
|
dfs()
|
||||||
|
{
|
||||||
|
if [[ $1 == update ]]; then
|
||||||
|
(cd "$DOTFILES" && env git pull)
|
||||||
|
else
|
||||||
|
echo "unknown command \"$1\". available: update"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# alias
|
||||||
|
alias "pls"='sudo $(fc -ln -1)'
|
||||||
|
alias "se"='sudo -sE'
|
|
@ -89,7 +89,7 @@ setup_color() {
|
||||||
}
|
}
|
||||||
# END of color settings
|
# END of color settings
|
||||||
|
|
||||||
dotfile_path=$(cd $(dirname $0); pwd)
|
dotfile_path=$( cd "$( dirname "${BASH_SOURCE[0]:-${(%):-%x}}" )" && pwd )
|
||||||
home_slashes=${HOME//\//\\\/}
|
home_slashes=${HOME//\//\\\/}
|
||||||
if [[ ! $dotfile_path == ${home_slashes}* ]]; then
|
if [[ ! $dotfile_path == ${home_slashes}* ]]; then
|
||||||
fmt_fatal "\"$dotfile_path\" is not under \"$HOME\". aborting ..."
|
fmt_fatal "\"$dotfile_path\" is not under \"$HOME\". aborting ..."
|
||||||
|
|
Loading…
Reference in New Issue
Block a user