update
This commit is contained in:
@@ -45,22 +45,20 @@ prepend_path "$HOME/.local/scripts"
|
||||
prepend_path "$HOME/.local/share/fnm"
|
||||
export PATH
|
||||
|
||||
# fnm
|
||||
if type fnm &>/dev/null; then
|
||||
eval "$(fnm env --shell bash)"
|
||||
fi
|
||||
|
||||
# export UY_ENABLE_GPG_AGENT_SSH=1 in .profile to enable GPG agent for SSH
|
||||
if type gpgconf &>/dev/null && type gpg-connect-agent &>/dev/null &&
|
||||
[ -x "$HOME/.local/scripts/gpg-init" ] &&
|
||||
[ "${UY_ENABLE_GPG_AGENT_SSH:-0}" = "1" ]; then
|
||||
[ "${UY_ENABLE_GPG_AGENT_SSH:-0}" = "1" ]; then
|
||||
# GPG agent for SSH
|
||||
eval "$($HOME/.local/scripts/gpg-init 2>/dev/null)" &>/dev/null
|
||||
fi
|
||||
|
||||
if type ssh-add &>/dev/null && type ssh-agent &>/dev/null &&
|
||||
{ [ -z "$SSH_AUTH_SOCK" ] ||
|
||||
[ "$(ssh-add -l &>/dev/null; echo $?)" -eq 2 ]; } &&
|
||||
[ "$(
|
||||
ssh-add -l &>/dev/null
|
||||
echo $?
|
||||
)" -eq 2 ]; } &&
|
||||
[ -x "$HOME/.local/scripts/ssh-init" ]; then
|
||||
unset SSH_AUTH_SOCK
|
||||
# SSH with cross-session ssh-agent
|
||||
|
||||
@@ -49,6 +49,10 @@ if type gpg &>/dev/null; then
|
||||
export GPG_TTY
|
||||
fi
|
||||
|
||||
if type fnm &>/dev/null; then
|
||||
eval "$(fnm env --shell bash --use-on-cd)"
|
||||
fi
|
||||
|
||||
if [[ ${UY_USING_SSH_AGENT:-0} == 1 ]]; then
|
||||
function sshs() {
|
||||
if ! ssh-add -l &>/dev/null; then
|
||||
@@ -63,5 +67,5 @@ if [[ ${UY_USING_SSH_AGENT:-0} == 1 ]]; then
|
||||
fi
|
||||
|
||||
if type starship &>/dev/null; then
|
||||
eval $(starship init bash)
|
||||
eval "$(starship init bash)"
|
||||
fi
|
||||
|
||||
@@ -26,3 +26,8 @@ set -x -g GPG_TTY (tty)
|
||||
# done
|
||||
set -U __done_min_cmd_duration 10000
|
||||
set -U __done_notification_urgency_level low
|
||||
|
||||
# fnm
|
||||
if type -q fnm
|
||||
fnm env --shell fish --use-on-cd | source
|
||||
end
|
||||
|
||||
@@ -35,3 +35,10 @@ ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="fg=#6c7086"
|
||||
if (( $+commands[code] )) && [[ "$TERM_PROGRAM" == "vscode" ]]; then
|
||||
source "$(code --locate-shell-integration-path zsh)"
|
||||
fi
|
||||
|
||||
# fnm
|
||||
|
||||
if (( $+commands[fnm] )); then
|
||||
eval "$(fnm env --shell zsh --use-on-cd)"
|
||||
fi
|
||||
|
||||
|
||||
@@ -50,12 +50,6 @@ prepend_path "$HOME/.local/scripts"
|
||||
prepend_path "$HOME/.local/share/fnm"
|
||||
export PATH
|
||||
|
||||
# fnm
|
||||
|
||||
if (( $+commands[fnm] )); then
|
||||
eval "$(fnm env --shell zsh)"
|
||||
fi
|
||||
|
||||
# GPG agent for SSH
|
||||
|
||||
if (( $+commands[gpgconf] )) && (( $+commands[gpg-connect-agent] )) &&
|
||||
|
||||
Reference in New Issue
Block a user