Last active
September 25, 2020 07:23
-
-
Save rg3915/0a0b1e514d11fdbc44f1 to your computer and use it in GitHub Desktop.
My bash_profile bash_aliases
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
alias l='clear; ls -lF' | |
alias ll='clear; ls -alF' | |
alias h=history | |
alias python=python3 | |
### Short prompt | |
alias p='PS1="\${debian_chroot:+(\$debian_chroot)}\e[1;34m/\W\e[00m\[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ "; clear' | |
# Git | |
alias g='git' | |
alias gp='git push origin HEAD' | |
# Docker | |
alias d='docker' | |
alias dco='docker container' | |
alias dcols='docker container ls' |
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
#### Activate virtualenv | |
alias sa='source .venv/bin/activate; PS1="\${debian_chroot:+(\$debian_chroot)}(`basename \"$VIRTUAL_ENV\"`)\[\e[1;34m:/\]\W\e[00m\[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ "; clear' | |
alias m='python $VIRTUAL_ENV/../manage.py' | |
alias r='m runserver' | |
alias pir='pip install -U pip; pip install -r requirements.txt' | |
alias piru='pip install -U pip' | |
alias pvv='python -m venv .venv' | |
alias pf='pip freeze' | |
### Short prompt | |
alias pa='PS1="\${debian_chroot:+(\$debian_chroot)}(`basename \"$VIRTUAL_ENV\"`)\e[1;34m:/\W\e[00m\[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ "; clear' | |
alias p='PS1="\${debian_chroot:+(\$debian_chroot)}\e[1;34m/\W\e[00m\[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ "; clear' | |
# In .bashrc insert | |
# https://github.com/jimeh/git-aware-prompt | |
# mkdir ~/.bash | |
# cd ~/.bash | |
# git clone git://github.com/jimeh/git-aware-prompt.git | |
export GITAWAREPROMPT=~/.bash/git-aware-prompt | |
source "${GITAWAREPROMPT}/main.sh" | |
export PS1="\${debian_chroot:+(\$debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ " | |
# Git | |
alias g='git' | |
alias gp='git push origin HEAD' | |
alias gpheroku='git push heroku master' | |
# font: https://github.com/jimeh/git-aware-prompt | |
alias contrib='git clone https://gist.github.com/22626de522f5c045bc63acdb8fe67b24.git /tmp/contrib; if [ ! -d contrib ]; then mkdir contrib; fi; cp /tmp/contrib/env_gen.py contrib/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment