diff --git a/files/sh/.config/sh/profile b/files/sh/.config/sh/profile index 669b180..4667485 100644 --- a/files/sh/.config/sh/profile +++ b/files/sh/.config/sh/profile @@ -127,6 +127,11 @@ if test -z "${SSH_AUTH_SOCK-}" && has ssh-agent; then eval "$(ssh-agent -s)" >/dev/null fi +## Zsh sources this shell profile before no_nomatch is set in zshrc, thus +## fails with "no matches found" when the glob can't be expanded. +if test -n "${ZSH_VERSION:-}"; then + setopt no_nomatch +fi for f in "$XDG_CONFIG_HOME/sh/profile.d"/*.sh; do # shellcheck disable=SC1090,SC1091 ! test -r "$f" || . "$f" diff --git a/files/sh/.config/sh/shrc b/files/sh/.config/sh/shrc index a9133e1..84ce5ec 100644 --- a/files/sh/.config/sh/shrc +++ b/files/sh/.config/sh/shrc @@ -22,10 +22,6 @@ esac stty -ixon set -o noclobber set -o notify -## Vi-mode does not work on Debian Bullseye with Dash 5.11 (2020). -## Debian Boowkworm has Dash >5.11 (2021) with adds libedit to the shell. -## https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=561663 -#set -o vi #stty quit undef stty werase undef ## }}} @@ -120,11 +116,10 @@ if has mutt; then fi ## }}} ## {{{ Git -if has git; then +if { ! test -f /usr/share/whonix/marker && has git; } || + { test -f /usr/share/whonix/marker && git -v >/dev/null 2>&1; } +then ## Whonix UWT wrapper circumvents the command existence check. - if test -f /usr/share/whonix/marker; then - git -v >/dev/null 2>&1 || return - fi alias g="git" alias gcd='cd "$(git rev-parse --show-toplevel)"' ## Use git aliases with 'g' prefix.