-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bash_profileHigh
51 lines (42 loc) · 2.21 KB
/
.bash_profileHigh
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
#High Rick Sanchez PS1 Theme for Terminal in OSX and Linux
#OSX Tricks
# Get macOS Software Updates, and update installed Homebrew, npm, and their installed packages
alias update='sudo softwareupdate -i -a; brew update; brew upgrade; brew cleanup; npm install npm -g; npm update -g;'
# Get week number
alias week='date +%V'
#to get more interesting OSX System command aliases to help you to maintainence your PC
#visit github file: https://github.com/mathiasbynens/dotfiles/blob/main/.aliases
#to enable git completion
# find in your system, and copy to /usr/local/etc/bash_completion.d/git-completion.bash
# sudo find / -type f -name "git-completion.bash" &>/dev/null
. /usr/local/etc/bash_completion.d/git-completion.bash
#GIT PS1 THEMA Corrigir isso ( precisa instalar o git completion file corretamente)
#gitPS1='\[\033[0;32m\]\[\033[0m\033[0;32m\]$(parse_git_branch)$(__git_ps1)$(git symbolic-ref HEAD)\[\033[0;36m\] @\[\033[0;36m\]\w\[\033[0;32m\]\n\[\033[0;32m\]└─\[\033[0m\033[0;32m\] \$\[\033[0m\033[0;32m\] ▶\[\033[0m\] '
alias g="git"
# Enable tab completion for `g` by marking it as an alias for `git`
if type _git &> /dev/null; then
complete -o default -o nospace -F _git g;
fi;
#Mostra no Git onde estamos
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
#SH High
cbbong='\033[32m[🚬_\|/_🚬 $(parse_git_branch) @\n\033[35m:\w\033[32m]$\033[0m(🌿⚗️) '
cbjoint='\033[32m[🚬 @\n\033[35m:\w\033[32m]$\033[0m(🌿🚬) '
cbhigh='\033[32m[🚬🚬 @\n\033[35m:\w\033[32m]$\033[0m(😌💨) '
cbstoned='\033[32m[_\|/_ @\n\033[35m:\w\033[32m]$\033[0m(😳🍃) '
cbcooked='\033[32m[ @\n\033[35m:\w\033[32m]$\033[0m(😶🍳) '
cbblazed='\033[32m[🚬_\|/_🚬 @\n\033[35m:\w\033[32m]$\033[0m(😳🔥) '
cbhexaling='\033[32m[_\|/_🚬 @\n\033[35m:\w\033[32m]$\033[0m(😮💨) '
cbfaceclouds='\033[32m[🚬_\|/_🚬 @\n\033[35m:\w\033[32m]$\033[0m(😶🌫️) '
# UID 0 is the root user
if [[ $(id -u) -eq 0 ]];then
# ps1 for root user
PS1='👿 [\u@\h \W]\$ '
else
# ps1 for normal user
#PS1='\u@\W\$'
expression=($cbhigh $cbbong $cbjoint $cbstoned $cbcooked $cbblazed $cbhexaling $cbfaceclouds)
PS1=${expression[$RANDOM % ${#expression[@]} ]}
fi