gdebug supports empty; --dry-run wip

This commit is contained in:
xiongdian.me 2022-12-23 12:04:41 +08:00
parent cfca3ad145
commit b2e26067ac
2 changed files with 3 additions and 2 deletions

View File

@ -100,7 +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 ($(date))"'
alias "gdebug"='git add -A; git commit --allow-empty -m "bug fix ($(date))"'
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"' ;;
@ -165,7 +165,7 @@ dfs()
$EDITOR ~/.config/dotfiles/env
;;
force-update ) (
cd "$DOTFILES"
cd "$DOTFILES"
git fetch --all
ref=$(git symbolic-ref --short HEAD 2> /dev/null) || ref=$(git rev-parse --short HEAD 2> /dev/null) || return 0
for i in $(git for-each-ref refs/heads --format='%(refname)') ; do git checkout ${i#refs/heads/} ; git pull --ff-only ; done

View File

@ -15,6 +15,7 @@ if [[ "${BASH_SOURCE[0]}" != "${0}" ]]; then
-q*|--quite ) export DFS_QUIET=1 ;;
-l*|--lite ) export DFS_LITE=1 ;;
--color ) export DFS_COLOR=1 ;;
--dry-run ) export DFS_DRY_RUN=1 ;;
--*=* ) GOT_OPTS+=("${ARG%%=*}" "${ARG#*=}") ;;
--* ) GOT_OPTS+=("$ARG") ;;
-* ) GOT_OPTS+=("${ARG:0:2}") ;;