mirror of
https://github.com/DictXiong/dotfiles.git
synced 2025-12-18 03:17:49 +08:00
debug
This commit is contained in:
parent
53eefc3978
commit
b775c932ad
11
.zshrc2
11
.zshrc2
@ -61,15 +61,16 @@ antigen apply
|
||||
# end of antigen config
|
||||
|
||||
# functions
|
||||
dotfile_path=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
export DOTFILES=$( cd "$( dirname "${BASH_SOURCE[0]:-${(%):-%x}}" )" && pwd )
|
||||
dfs()
|
||||
{
|
||||
if [[$1 == 'update']]; then
|
||||
(cd "$dotfile_path" && env git pull)
|
||||
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"
|
||||
alias "pls"='sudo $(fc -ln -1)'
|
||||
alias "se"='sudo -sE'
|
||||
@ -89,7 +89,7 @@ setup_color() {
|
||||
}
|
||||
# END of color settings
|
||||
|
||||
dotfile_path=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
dotfile_path=$( cd "$( dirname "${BASH_SOURCE[0]:-${(%):-%x}}" )" && pwd )
|
||||
home_slashes=${HOME//\//\\\/}
|
||||
if [[ ! $dotfile_path == ${home_slashes}* ]]; then
|
||||
fmt_fatal "\"$dotfile_path\" is not under \"$HOME\". aborting ..."
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user