fix: shell stops parsing early

This commit is contained in:
Ben Grande 2024-02-18 21:24:08 +01:00
parent 3d49981cab
commit 701f291daa
No known key found for this signature in database
GPG Key ID: 00C64E14F51F9E56
2 changed files with 8 additions and 8 deletions

View File

@ -127,6 +127,11 @@ if test -z "${SSH_AUTH_SOCK-}" && has ssh-agent; then
eval "$(ssh-agent -s)" >/dev/null eval "$(ssh-agent -s)" >/dev/null
fi 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 for f in "$XDG_CONFIG_HOME/sh/profile.d"/*.sh; do
# shellcheck disable=SC1090,SC1091 # shellcheck disable=SC1090,SC1091
! test -r "$f" || . "$f" ! test -r "$f" || . "$f"

View File

@ -22,10 +22,6 @@ esac
stty -ixon stty -ixon
set -o noclobber set -o noclobber
set -o notify 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 quit undef
stty werase undef stty werase undef
## }}} ## }}}
@ -120,11 +116,10 @@ if has mutt; then
fi fi
## }}} ## }}}
## {{{ Git ## {{{ 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. ## 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 g="git"
alias gcd='cd "$(git rev-parse --show-toplevel)"' alias gcd='cd "$(git rev-parse --show-toplevel)"'
## Use git aliases with 'g' prefix. ## Use git aliases with 'g' prefix.