Skip to content

Instantly share code, notes, and snippets.

@trevren11
Last active October 19, 2017 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trevren11/390424bf4b529bce0344b36f992cc618 to your computer and use it in GitHub Desktop.
Save trevren11/390424bf4b529bce0344b36f992cc618 to your computer and use it in GitHub Desktop.
My Bash Profile
#Alias/shortcut commands
cyan "Importing Aliases"
alias src="source ~/.bash_profile"
alias sre="$EDITOR ~/.bash_profile"
alias sra="$EDITOR ~/.aliai"
alias srv="$EDITOR ~/.variables.sh"
alias srf="$EDITOR ~/.functions.sh"
#TODO make an alias to amend to bash profile so it is easier to add
#alias amd=""
alias cdgit='cd ~/Documents/code'
alias cg='cd ~/Documents/code'
alias s='source ~/.bashrc'
#So this ended up being different than I wanted, this file now is basically just sourcing other things so I don't have a huge bash profile
source ~/.functions.sh
source ~/.variables.sh
source ~/.gitCommands.sh
source ~/.colors.sh
source ~/.aliai.sh
#you know, the plural for alias...
#This is just a library of colors and other things that take up more space than I would like
#Terminal profile output
export PS1="\n$cLG\u $cCy\w $cLG\$$cD "
#there is a problem with this on some commands, the colors are not properly wrapped but if they do get wrapped, then sometimes they print out the wrapping braces
#Profile color scheme
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
#Black 0;30 Dark Gray 1;30
#Red 0;31 Light Red 1;31
#Green 0;32 Light Green 1;32
#Brown/Orange 0;33 Yellow 1;33
#Blue 0;34 Light Blue 1;34
#Purple 0;35 Light Purple 1;35
#Cyan 0;36 Light Cyan 1;36
#Light Gray 0;37 White 1;37
#maybe need to rename the colors, not a huge fan of them
# define colors
C_DEFAULT="\[\033[m\]"
C_WHITE="\[\033[1m\]"
C_BLACK="\[\033[30m\]"
C_RED="\[\033[31m\]"
C_GREEN="\[\033[32m\]"
C_YELLOW="\[\033[33m\]"
C_BLUE="\[\033[34m\]"
C_PURPLE="\[\033[35m\]"
C_CYAN="\[\033[36m\]"
C_LIGHTGRAY="\[\033[37m\]"
C_DARKGRAY="\[\033[1;30m\]"
C_LIGHTRED="\[\033[1;31m\]"
C_LIGHTGREEN="\[\033[1;32m\]"
C_LIGHTYELLOW="\[\033[1;33m\]"
C_LIGHTBLUE="\[\033[1;34m\]"
C_LIGHTPURPLE="\[\033[1;35m\]"
C_LIGHTCYAN="\[\033[1;36m\]"
C_BG_BLACK="\[\033[40m\]"
C_BG_RED="\[\033[41m\]"
C_BG_GREEN="\[\033[42m\]"
C_BG_YELLOW="\[\033[43m\]"
C_BG_BLUE="\[\033[44m\]"
C_BG_PURPLE="\[\033[45m\]"
C_BG_CYAN="\[\033[46m\]"
C_BG_LIGHTGRAY="\[\033[47m\]"
#color rename
cD="\033[m"
cW="\033[1m"
cBk="\033[30m"
cR="\033[31m"
cG="\033[32m"
cY="\033[33m"
cBlu="\033[34m"
cP="\033[35m"
cCy="\033[36m"
cLGry="\033[37m"
cDGry="\033[1;30m"
cLR="\033[1;31m"
cLG="\033[1;32m"
clBlu="\033[1;34m"
cLP="\033[1;35m"
cLCy="\033[1;36m"
#I kind of like these better
restore='\033[0m'
black='\033[0;30m'
red='\033[0;31m'
green='\033[0;32m'
brown='\033[0;33m'
blue='\033[0;34m'
purple='\033[0;35m'
cyan='\033[0;36m'
light_gray='\033[0;37m'
dark_gray='\033[1;30m'
light_red='\033[1;31m'
light_green='\033[1;32m'
yellow='\033[1;33m'
light_blue='\033[1;34m'
light_purple='\033[1;35m'
light_cyan='\033[1;36m'
white='\033[1;37m'
echo -e "$cCy \bImporting $cBlu\b c$cR \bo$cY \bl$cG \bo$cCy \br$cP \bs$cD"
#Functions
#append to x file (likely just between aliai and other ones on this page
#name () compound-command [ redirections ]
#Simple print statements, maybe make on one line?
white ()
{
echo -ne "${white}${1}${restore}\n"
}
green ()
{
echo -ne "${green}${1}${restore}\n"
}
cyan ()
{
echo -ne "${cyan}${1}${restore}\n"
}
red ()
{
echo -ne "${red}${1}${restore}\n"
}
#Git shortcuts
#rebase
#reset hard to head
#alias to add all files to git, give comit message? and push (with setting upstream)
#alias to do a no edit amend to git repo
# git add -A; git commit --no-edit --amend; git gerrit-submit
#Set variable names here
export ALAIAI="~/.aliai"
export VARIABLES="~/.variables"
export BASH='~/.bash_profile'
export EDITOR="vim"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment