Last active
February 9, 2019 17:45
-
-
Save jayers99/adc109fc070487ef54d31415aa2a5d26 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# .bashrc | |
export PROMPT_COMMAND='history -a' | |
# Source global definitions | |
if [ -f /etc/bashrc ]; then | |
. /etc/bashrc | |
fi | |
# Uncomment the following line if you don't like systemctl's auto-paging feature: | |
# export SYSTEMD_PAGER= | |
# User specific aliases and functions | |
alias la='ls -la' | |
alias md='mkdir' | |
alias hist='history 60' | |
alias hg='history | grep ' | |
alias hcds='history | grep -i -E '\''^\s[0-9]+\s+cd\s+'\'' | grep -iv -E '\''^\s[0-9]+\s+cd\s+\.\.'\'' | grep -iv -E '\''^\s[0-9]+\s+cd\s+\-'\'' | sort -r | awk '\''!seen[$3] {print $0} {++seen[$3]}'\'' | sort' | |
alias hcdcode='history | grep -i -E '\''^\s[0-9]+\s+cd\s+\~/code'\'' | sort -r | awk '\''!seen[$3] {print $0} {++seen[$3]}'\'' | sort' | |
alias hvims='history | grep vim' | |
alias hgits='history | grep git' | |
# my prompt | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="\n\[\033[00;33m\]\u@\h\[\033[0m\]:\[\033[00;34m\]\w\[\033[00;32m\]\$(parse_git_branch)\[\033[00;0m\]\n\[\033[00;33m\]> $\[\033[00;0m\] " | |
# auto complete aws cli commands | |
complete -C '~/Library/Python/3.6/bin/aws_completer' aws | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment