mirror of
https://github.com/Xevion/dotfiles.git
synced 2026-01-31 00:24:06 -06:00
refactor: standardize shell initialization and improve PATH management
- Consolidate common environment setup across Fish, Bash, and PowerShell - Improve PATH handling with deduplication and proper ordering - Clean up TODO.md formatting and organization - Simplify CUDA and development tool configuration
This commit is contained in:
+12
-12
@@ -1,6 +1,13 @@
|
||||
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||
# for examples
|
||||
#
|
||||
# Load order:
|
||||
# 1. ~/.bashrc (this file) - Bash-specific configuration
|
||||
# 2. commonrc.sh.tmpl - Shared environment setup (PATH, tools, etc.)
|
||||
# 3. ~/.bash_aliases - Aliases and functions
|
||||
#
|
||||
# Fish equivalent: ~/.config/fish/config.fish → commonrc.fish.tmpl
|
||||
|
||||
# If not running interactively, don't do anything
|
||||
case $- in
|
||||
@@ -98,23 +105,16 @@ if ! shopt -oq posix; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# thefuck - corrects previous console command
|
||||
if command -v thefuck &> /dev/null; then
|
||||
eval $(thefuck --alias)
|
||||
fi
|
||||
|
||||
# VS Code / Cursor shell integration
|
||||
[[ "$TERM_PROGRAM" == "vscode" ]] && . "$(code --locate-shell-integration-path bash)"
|
||||
|
||||
{{/* Common shared aliases, scripts, & shell setup details. */ -}}
|
||||
# Load shared environment setup (PATH, tools, version managers, etc.)
|
||||
{{ template "scripts/commonrc.sh.tmpl" dict "data" . "shell" "bash" }}
|
||||
|
||||
{{/* Chezmoi's shell completion */ -}}
|
||||
{{ completion "bash" }}
|
||||
|
||||
# If WSL, add SSH key on startup (once per WSL start)
|
||||
{{- if .wsl }}
|
||||
eval `keychain --quiet --eval --agents ssh ~/.ssh/id_rsa`
|
||||
{{ end }}
|
||||
|
||||
# SDKMAN initialization
|
||||
export SDKMAN_DIR="$HOME/.sdkman"
|
||||
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||
# Chezmoi shell completion
|
||||
{{ completion "bash" }}
|
||||
Reference in New Issue
Block a user