Fix Bash configuration
This commit is contained in:
20
bash/.bashrc
20
bash/.bashrc
@@ -1,7 +1,7 @@
|
|||||||
# Enable the subsequent settings only in interactive sessions
|
# Enable the subsequent settings only in interactive sessions
|
||||||
case $- in
|
case $- in
|
||||||
*i*) ;;
|
*i*) ;;
|
||||||
*) return;;
|
*) return ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Path to your oh-my-bash installation.
|
# Path to your oh-my-bash installation.
|
||||||
@@ -174,17 +174,17 @@ alias egrep='grep -E'
|
|||||||
alias fgrep='grep -F'
|
alias fgrep='grep -F'
|
||||||
|
|
||||||
# Other aliases
|
# 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 userlist="cut -d: -f1 /etc/passwd | sort"
|
||||||
alias ip='ip -color'
|
alias ip='ip -color'
|
||||||
alias stow='stow -d $DOTFILES '
|
alias stow='stow -d $DOTFILES '
|
||||||
|
|
||||||
# Starship prompt
|
# User specific aliases and functions
|
||||||
if command -v starship > /dev/null 2>&1; then
|
if [ -d ~/.bashrc.d ]; then
|
||||||
eval "$(starship init bash)"
|
for rc in ~/.bashrc.d/*; do
|
||||||
fi
|
if [ -f "$rc" ]; then
|
||||||
|
. "$rc"
|
||||||
# Load Mise en dev
|
fi
|
||||||
if command -v mise > /dev/null 2>&1; then
|
done
|
||||||
eval "$(mise activate bash)"
|
|
||||||
fi
|
fi
|
||||||
|
unset rc
|
||||||
|
|||||||
6
bash/.bashrc.d/starship.sh
Normal file
6
bash/.bashrc.d/starship.sh
Normal 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
|
||||||
@@ -46,11 +46,8 @@ appendpath() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
appendpath "/home/linuxbrew/.linuxbrew/bin"
|
||||||
appendpath "$HOME/.local/bin"
|
appendpath "$HOME/.local/bin"
|
||||||
appendpath "$GOBIN"
|
appendpath "$GOBIN"
|
||||||
appendpath "$HOME/.cargo/bin"
|
appendpath "$HOME/.cargo/bin"
|
||||||
unset appendpath
|
unset appendpath
|
||||||
|
|
||||||
source "$HOME/.profile.d/homebrew.sh"
|
|
||||||
source "$HOME/.profile.d/mise.sh"
|
|
||||||
source "$HOME/.profile.d/java.sh"
|
|
||||||
|
|||||||
@@ -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
|
|
||||||
Reference in New Issue
Block a user