fix(alias): add source env to install-alias

This commit is contained in:
liuyx 2023-10-10 11:23:51 +08:00
parent d101fd030f
commit 599434a4be

View File

@ -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"
}