refactor code and add fallback prompt to zsh

This commit is contained in:
2026-02-13 10:19:45 +01:00
parent 1cdc70eb70
commit 25a4a6076c
19 changed files with 150 additions and 189 deletions

View File

@@ -1,5 +1,5 @@
# Set environment variables
if command -v nvim &> /dev/null; then
if command -v nvim >/dev/null 2>&1; then
export EDITOR="nvim"
else
export EDITOR="vim"
@@ -21,7 +21,7 @@ export GPGKEY="4A45503BBE575E3D4DAF28E27264AFFDC98D52BB"
# gpg-agent
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket 2>/dev/null)"
if [[ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne "$$" ]]; then
SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket 2>/dev/null)
export SSH_AUTH_SOCK
fi