-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.bashrc
69 lines (61 loc) · 1.72 KB
/
.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
# Detect Platform
case "$(uname -s)" in
Linux*) machine=Linux;;
Darwin*) machine=Mac;;
esac
# Handle Platform Specifics
if [[ "$machine" = "Mac" ]]; then
export HOMEBREW_NO_ANALYTICS=1
export DOTNET_CLI_TELEMETRY_OPTOUT=1
export POWERSHELL_TELEMETRY_OPTOUT=1
eval $(/opt/homebrew/bin/brew shellenv)
export PATH="/opt/homebrew/opt/coreutils/libexec/gnubin:$PATH"
fi
# Colours
WHITE="\[$(tput setaf 255)\]"
BLACK="$(tput setaf 008)\]"
RED="\[$(tput setaf 001)\]"
GREEN="\[$(tput setaf 002)\]"
ORANGE="\[$(tput setaf 003)\]"
BLUE="\[$(tput setaf 004)\]"
PURPLE="\[$(tput setaf 005)\]"
TEAL="\[$(tput setaf 006)\]"
GREY="\[$(tput setaf 007)\]"
BRED="\[$(tput setab 009)\]"
BGREEN="\[$(tput setab 010)\]"
BORANGE="\[$(tput setab 011)\]"
BBLUE="\[$(tput setab 012)\]"
BPURPLE="\[$(tput setab 013)\]"
BTEAL="\[$(tput setab 014)\]"
BGREY="\[$(tput setab 238)\]"
RESET="\[$(tput sgr0)\]"
# Interaction Prompts
directory="$(pwd)"
basedirectory="$(basename $(pwd))"
if [ "$directory" = "/home/$USER" ]
then
displaydirectory="~"
else
displaydirectory=$basedirectory
fi
export PS1="$GREEN(\W) $RED>> $RESET"
export PS2="$ORANGE>$WHITE$RESET "
export PS3="$GREEN?$WHITE$RESET "
export PS4="$BLUE+$WHITE$RESET "
# Pathing
export PATH=$PATH:/home/$USER/.scripts/
if [[ "$(which go)" != "" ]]; then
export PATH=$PATH:$(go env GOPATH)/bin
fi
# GCloud
if [ -f '/opt/google-cloud-sdk/path.bash.inc' ]; then . '/opt/google-cloud-sdk/path.bash.inc'; fi
if [ -f '/opt/google-cloud-sdk/completion.bash.inc' ]; then . '/opt/google-cloud-sdk/completion.bash.inc'; fi
# Misc
if [ -f ~/.scripts/welcome.sh ]; then
bash ~/.scripts/welcome.sh
fi