Last active
May 14, 2024 04:15
-
-
Save standoge/f412e5d9b42c9e6c903130f5b50ca0ab to your computer and use it in GitHub Desktop.
standoge's dotfile
This file contains 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
#!/bin/bash | |
### FUNCTIONS ### | |
current_branch () { | |
git rev-parse --abbrev-ref HEAD | |
} | |
vir (){ | |
python3 -m venv venv | |
} | |
vin () { | |
source ./venv/bin/activate | |
} | |
mk () { | |
mkdir $1 && cd $1 | |
} | |
### ALIASES ### | |
# -- pacman -- | |
alias fresh='source ~/.bashrc' | |
alias pinfo='pacman -Qi' | |
alias porp='sudo pacman Qtdq' | |
alias pinstall='sudo pacman -S' | |
alias premove='sudo pacman -R' | |
alias syu='sudo pacman -Syyu' | |
# -- files -- | |
alias l='exa --long -B --header --git --group-directories-first' | |
alias lt='exa --header --git --group-directories-first --tree --level=2' | |
# -- git -- | |
alias g='git' | |
alias lg='lazygit' | |
alias gpush='git push origin $(current_branch)' | |
alias gpull='git pull origin $(current_branch)' | |
alias gswc='git switch -c' | |
alias gswm='git switch main && gpull' | |
alias gswd='git switch development && gpull' | |
alias gsw='git switch' | |
alias gcam='git commit -am' | |
alias gcams='git commit -S -am' | |
alias gtag='git tag -a' | |
alias gs='git status -s' | |
alias glgg='git log --graph --decorate --all' | |
alias gcmd='git commit --amend' | |
alias gcmda='git commit --amend -am' | |
alias gaa='git add --all' | |
alias gcache='git rm -rf --cached' | |
alias gm='git merge --no-commit' | |
alias glst='git log --stat -p' | |
alias gf='git fetch' | |
alias gd='git diff --color-moved=plain --minimal' | |
alias gupdate='gpush && gswm ; gm development && gpush ; gswd' | |
alias icode='code-insiders' | |
alias hack='icode ~/.zshrc' | |
# -- others -- | |
alias dp='doppler' | |
alias dpr='doppler run --' | |
alias dk='docker' | |
alias dc='docker compose' | |
alias dktop='docker stop $(docker ps -aq)' | |
alias h='history' | |
alias hdel='history -d' | |
alias ddel='sudo rm -r' | |
alias vdel='sudo rm -rf ~/.config/nvim && rm -rf ~/.local/share/nvim && rm -rf ~/.cache/nvim' | |
alias x='exit' | |
alias c='clear' | |
alias py='python3' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment