Rework final init and SSH session fix

This commit is contained in:
2025-04-24 02:03:55 -03:00
parent b314a6506d
commit 0d03127d06
3 changed files with 44 additions and 36 deletions

View File

@@ -142,3 +142,35 @@ alias yarn='yarn --use-yarnrc "$XDG_CONFIG_HOME"/yarn/config'
alias units='units --history "$XDG_DATA_HOME"/units_history'
alias nvidia-settings='nvidia-settings --config="$XDG_CONFIG_HOME"/nvidia/settings'
alias adb='HOME="$XDG_DATA_HOME"/android adb'
# If we have local rust installed, set it up
if [[ -f $XDG_DATA_HOME/cargo/env ]]; then
. "$XDG_DATA_HOME/cargo/env"
fi
# Final shell specific init
if [[ -n $BASH_VERSION ]]; then
# https://github.com/pkasemir/find-the-command
[[ -f /usr/share/doc/find-the-command/ftc.bash ]] && source /usr/share/doc/find-the-command/ftc.bash noupdate quiet info
# https://wiki.archlinux.org/title/Pkgfile#Command_not_found
# [[ -f /usr/share/doc/pkgfile/command-not-found.bash ]] && source /usr/share/doc/pkgfile/command-not-found.bash
# Starship after defining custom prompt, easy to remove
eval "$(starship init bash)"
# Zoxide init has to be last
eval "$(zoxide init bash)"
elif [[ -n $ZSH_VERSION ]]; then
# https://github.com/pkasemir/find-the-command
[[ -f /usr/share/doc/find-the-command/ftc.zsh ]] && source /usr/share/doc/find-the-command/ftc.zsh noupdate quiet info
# https://wiki.archlinux.org/title/Pkgfile#Command_not_found
# [[ -f /usr/share/doc/pkgfile/command-not-found.zsh ]] && source /usr/share/doc/pkgfile/command-not-found.zsh
# Starship after defining custom prompt, easy to remove
hash starship 2>/dev/null && eval "$(starship init zsh)"
# Zoxide init has to be last
hash zoxide 2>/dev/null && eval "$(zoxide init zsh)"
fi