Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #PROMPT STUFF
- GREEN=$(tput setaf 2);
- YELLOW=$(tput setaf 3);
- WHITE=$(tput setaf 7)
- function git_branch {
- # Shows the current branch if in a git repository
- git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ \(\1\)/';
- }
- rand() {
- printf $(( $1 * RANDOM / 32767 ))
- }
- rand_element () {
- local -a th=("$@")
- unset th[0]
- printf $'%s\n' "${th[$(($(rand "${#th[*]}")+1))]}"
- }
- #Default Prompt
- PS1="${YELLOW}\w${GREEN}\$(git_branch)${WHITE}\n$(rand_element 😅 👽 🔥 🚀 👻 ⛄ 👾 🍔 😄 🍰 🐑) $ ";
- # git aliases
- alias gc="git commit -m $1";
- alias gs="git status";
- alias gpull="git pull";
- alias gf="git fetch";
- alias gpush="git push";
- alias gco="git checkout";
- # npm aliases
- alias ni="npm install";
- alias nrs="npm run start";
- alias nrb="npm run build";
- alias nrt="npm run test";
- alias rmn="rm -rf node_modules;"
- alias flush-nom="rm -rf node_modules && npm cache clean && npm install";
- # Hardware aliases
- alias renew1="sudo ipconfig set en1 BOOTP && sudo ipconfig set en1 DHCP";
- alias renew0="sudo ipconfig set en1 BOOTP && sudo ipconfig set en1 DHCP";
- #Funness
- alias weather="curl -4 wttr.in/slc";
Add Comment
Please, Sign In to add comment