pointfichiers/shell/bash/.bashrc

59 lines
1.3 KiB
Bash
Raw Normal View History

2023-09-28 10:52:20 +02:00
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
export PS1='\[\033[1;33m\]\u\[\033[1;37m\]@\[\033[1;32m\]\h\[\033[1;37m\]:\[\033[1;31m\]\w \[\033[1;36m\]\$ \[\033[0m\]'
[[ "$(whoami)" = "root" ]] && return
if [ -f ~/.bash_env ]; then
source ~/.bash_env
fi
if [ -f ~/.bash_aliases ]; then
source ~/.bash_aliases
fi
[[ -z "$FUNCNEST" ]] && export FUNCNEST=100 # limits recursive functions, see 'man bash'
## Use the up and down arrow keys for finding a command in history
## (you can write some initial letters of the command first).
bind '"\e[A":history-search-backward'
bind '"\e[B":history-search-forward'
export PATH="$HOME/.local/bin:$PATH"
export EDITOR="hx"
2023-09-28 10:52:20 +02:00
export HISTFILESIZE=
2024-01-05 18:14:21 +01:00
export HISTSIZE=4294967295
2023-09-28 10:52:20 +02:00
# fnm
FNM_PATH="$HOME/.local/share/fnm"
2023-11-03 09:42:11 +01:00
if test -d "$FNM_PATH" ; then
2024-02-13 16:47:59 +01:00
export PATH="$FNM_PATH:$PATH"
2023-11-03 09:42:11 +01:00
eval "$(fnm env --use-on-cd)"
2023-09-28 10:52:20 +02:00
fi
CARGO_ENV_PATH="$HOME/.cargo/env"
if [ -f "$CARGO_ENV_PATH" ]; then
. "$CARGO_ENV_PATH"
fi
2023-09-28 10:52:20 +02:00
FLUTTER_PATH="/opt/flutter/bin"
if test -d "$FLUTTER_PATH"; then
export PATH="$FLUTTER_PATH:$PATH"
2024-02-16 15:12:46 +01:00
fi
2023-09-28 10:52:20 +02:00
if [ -f ~/.bash_exec ]; then
source ~/.bash_exec
fi
2023-11-10 13:59:28 +01:00
if command -v starship > /dev/null; then
eval "$(starship init bash)"
fi
if command -v zoxide > /dev/null; then
eval "$(zoxide init --cmd cd bash)"
2023-11-10 13:59:28 +01:00
fi