mirror of
https://github.com/DictXiong/dotfiles.git
synced 2025-04-24 12:36:55 +08:00
more robost dotfile_path
This commit is contained in:
parent
72b7b60449
commit
7c654e599e
5
.zshrc2
5
.zshrc2
|
@ -58,4 +58,7 @@ antigen bundle https://gitee.com/dictxiong/zsh-autosuggestions
|
|||
antigen theme ys
|
||||
# apply
|
||||
antigen apply
|
||||
# end of antigen config
|
||||
# end of antigen config
|
||||
|
||||
# functions
|
||||
dotfile_path=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
|
@ -89,7 +89,7 @@ setup_color() {
|
|||
}
|
||||
# END of color settings
|
||||
|
||||
dotfile_path=$(cd $(dirname $0); pwd)
|
||||
dotfile_path=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
|
||||
home_slashes=${HOME//\//\\\/}
|
||||
if [[ ! $dotfile_path == ${home_slashes}* ]]; then
|
||||
fmt_fatal "\"$dotfile_path\" is not under \"$HOME\". aborting ..."
|
||||
|
|
Loading…
Reference in New Issue
Block a user