Cleanup mandatory source files, PS1 migrated to starship anyways

This commit is contained in:
fanyx 2024-02-21 13:54:23 +01:00
parent fac9598c3f
commit 2a9338a410
1 changed files with 9 additions and 12 deletions

View File

@ -8,25 +8,22 @@
[[ $- != *i* ]] && return
#################################
# - bash_aliases
# Mandatory source files
# - bash-completion
# - bash-aliases
# - ps1 # replaced by starship, legacy
# always bash-completion first
[[ -r /usr/share/bash-completion/bash_completion ]] && . /usr/share/bash-completion/bash_completion
[[ -r /usr/share/bash-completion/bash_completion ]] &&\
source /usr/share/bash-completion/bash_completion
# custom bash-completions
[ -d ~/.config/completions ] && { for i in ~/.config/completions/*; do source $i; done }
[[ -d ~/.config/completions ]] &&\
{ for i in ~/.config/completions/*; do source $i; done }
# source distro and general purpose aliases
[[ -r ~/.bash_aliases ]] && . ~/.bash_aliases
# integrate git prompt functions
# will break PS1 if not used
[[ -f /usr/share/git/git-prompt.sh ]] && . /usr/share/git/git-prompt.sh
# kube-ps1
# located in ~/git/kube-ps1
[[ -r ~/git/kube-ps1/kube-ps1.sh ]] && . ~/git/kube-ps1/kube-ps1.sh
[[ -r ~/.bash_aliases ]] &&\
source ~/.bash_aliases
# set PS1 from file
# USE ONLY AFTER GIT PROMPT