Skip to content

Instantly share code, notes, and snippets.

@mikeyjk
Created April 14, 2020 08:22
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 mikeyjk/0bbf6ef37c7a9d1e38798cc403ec2326 to your computer and use it in GitHub Desktop.
Save mikeyjk/0bbf6ef37c7a9d1e38798cc403ec2326 to your computer and use it in GitHub Desktop.
bash aliases
force_color_prompt=yes
# append to the history file, don't overwrite it
shopt -s histappend
shopt -s globstar # allow dir pattern matching
shopt -s checkwinsize
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=10000
HISTFILESIZE=20000
VISUAL=nvim
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1='\n\[\033]0;$MSYSTEM:\w\007\033[32m\]\u@\h \[\033[33m\w\033[0m\] $(parse_git_branch)\n$ '
#aliases
alias l='ls -CalF'
alias dc='docker-compose'
alias branch="git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'"
alias pushthis='git push -u origin $(branch)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment