From 63c3d8e6d19de948bfe0da29da52fe4764495d11 Mon Sep 17 00:00:00 2001 From: "xiongdian.me" Date: Sun, 4 Dec 2022 14:45:14 +0800 Subject: [PATCH] common.sh: export vars in env; zshrc: gdebug --- .zshrc2 | 1 + tools/common.sh | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.zshrc2 b/.zshrc2 index 66b879d..1ecb5a0 100644 --- a/.zshrc2 +++ b/.zshrc2 @@ -100,6 +100,7 @@ alias "se"='sudo -sE' alias "pbd"='ping baidu.com' alias "p114"='ping 114.114.114.114' alias "p666"='ping6 2001:da8::666' +alias "gdebug"='git add -A; git commit -m "bug fix"' case $(bash "$DOTFILES/tools/common.sh" get_os_type) in macos ) alias l='ls -lAGh -D "%y-%m-%d %H:%M"' ;; * ) alias l='ls -lAGh --time-style="+%y-%m-%d %H:%M"' ;; diff --git a/tools/common.sh b/tools/common.sh index 87fcdfa..2e38c85 100755 --- a/tools/common.sh +++ b/tools/common.sh @@ -1,8 +1,8 @@ #!/bin/bash - +set -e THIS_DIR_COMMON_SH=$( cd "$( dirname "${BASH_SOURCE[0]:-${(%):-%x}}" )" && pwd ) export DOTFILES=$( cd "$THIS_DIR_COMMON_SH/.." && pwd ) -if [[ -f ~/.config/dotfiles/env ]]; then source ~/.config/dotfiles/env; fi +if [[ -f ~/.config/dotfiles/env ]]; then set -a; source ~/.config/dotfiles/env; set +a; fi # Color settings # Source: https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh