fix(alias): add source env to install-alias
This commit is contained in:
parent
d101fd030f
commit
599434a4be
@ -13,7 +13,8 @@ _check() {
|
||||
|
||||
case "$_continue" in
|
||||
y | Y) # 如果输入 y 或 Y,则用 sed 命令删除 source $alias_init_file 这一行
|
||||
awk '!/source "$alias_init_file"/' "$rc_file" > tmpfile && mv tmpfile "$rc_file"
|
||||
awk '!/source "$alias_init_file"/' "$rc_file" > tmpfile \
|
||||
&& mv tmpfile "$rc_file"
|
||||
echo "##### 覆盖 source $alias_init_file ######"
|
||||
;;
|
||||
*)
|
||||
@ -28,6 +29,7 @@ _check() {
|
||||
|
||||
_install() {
|
||||
rsync -a --backup --suffix=.bak ./alias.d "$HOME/"
|
||||
echo "source $alias_init_file" >> "$rc_file"
|
||||
echo "###### install success, enjoy it! #####"
|
||||
source "$alias_init_file"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user