Fix Bash configuration

This commit is contained in:
Fabio Scotto di Santolo
2025-12-17 23:17:42 +01:00
parent bf00633d7c
commit 009385e3fd
8 changed files with 17 additions and 19 deletions

View File

@@ -1,7 +1,7 @@
# Enable the subsequent settings only in interactive sessions
case $- in
*i*) ;;
*) return;;
*) return ;;
esac
# Path to your oh-my-bash installation.
@@ -174,17 +174,17 @@ alias egrep='grep -E'
alias fgrep='grep -F'
# Other aliases
alias paths='echo -e ${PATH//:/\\n}' # path: Echo all executable Paths
alias paths='echo -e ${PATH//:/\\n}' # path: Echo all executable Paths
alias userlist="cut -d: -f1 /etc/passwd | sort"
alias ip='ip -color'
alias stow='stow -d $DOTFILES '
# Starship prompt
if command -v starship > /dev/null 2>&1; then
eval "$(starship init bash)"
fi
# Load Mise en dev
if command -v mise > /dev/null 2>&1; then
eval "$(mise activate bash)"
# User specific aliases and functions
if [ -d ~/.bashrc.d ]; then
for rc in ~/.bashrc.d/*; do
if [ -f "$rc" ]; then
. "$rc"
fi
done
fi
unset rc

View File

@@ -0,0 +1,6 @@
#!/usr/bin/env bash
# Starship prompt
if command -v starship >/dev/null 2>&1; then
eval "$(starship init bash)"
fi

View File

@@ -46,11 +46,8 @@ appendpath() {
esac
}
appendpath "/home/linuxbrew/.linuxbrew/bin"
appendpath "$HOME/.local/bin"
appendpath "$GOBIN"
appendpath "$HOME/.cargo/bin"
unset appendpath
source "$HOME/.profile.d/homebrew.sh"
source "$HOME/.profile.d/mise.sh"
source "$HOME/.profile.d/java.sh"

View File

@@ -1,5 +0,0 @@
#!/usr/bin/env zsh
if command -v tmux &> /dev/null && [ -z "$TMUX" ]; then
tmux attach-session -t default || tmux new-session -s default
fi