-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_bashrc
38 lines (29 loc) · 1.05 KB
/
dot_bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/usr/bin/env bash
# shellcheck shell=bash
# vi: ft=bash:ts=4:sw=4
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return ;;
esac
# shellcheck source=dot_config/rc_files/00-xdg-env.sh
source "$HOME/.config/rc_files/00-xdg-env.sh"
BASHRC_FILES="$XDG_CONFIG_HOME/bashrc.d"
RC_FILES="$XDG_CONFIG_HOME/rc_files"
# shellcheck source=dot_config/bashrc.d/shopt.sh
source "$BASHRC_FILES/shopt.sh"
# shellcheck source=dot_config/bashrc.d/completion.sh
source "$BASHRC_FILES/completion.sh"
for file in "$RC_FILES"/*.sh; do
# shellcheck source=/dev/null
source "$file"
done
unset BASHRC_FILES RC_FILES
# set variable identifying the chroot you work in (used in the prompt below)
if [[ -z "${debian_chroot:-}" ]] && [[ -r /etc/debian_chroot ]]; then
debian_chroot=$(cat /etc/debian_chroot)
fi
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '