eddit .bashrc
This commit is contained in:
parent
a11416f4a8
commit
c4bd9ab38b
1 changed files with 57 additions and 0 deletions
57
.bashrc
57
.bashrc
|
@ -14,4 +14,61 @@ fi
|
||||||
if [[ ! "$SSH_AUTH_SOCK" ]]; then
|
if [[ ! "$SSH_AUTH_SOCK" ]]; then
|
||||||
source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
|
source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
### ARCHIVE EXTRATION
|
||||||
|
# usage: ex <file>
|
||||||
|
# found in https://gitlab.com/dwt1/dotfiles/-/blob/master/.bashrc
|
||||||
|
ex ()
|
||||||
|
{
|
||||||
|
if [ -f $1 ] ; then
|
||||||
|
case $1 in
|
||||||
|
*.tar.bz2) tar xjf $1 ;;
|
||||||
|
*.tar.gz) tar xzf $1 ;;
|
||||||
|
*.bz2) bunzip2 $1 ;;
|
||||||
|
*.rar) unrar x $1 ;;
|
||||||
|
*.gz) gunzip $1 ;;
|
||||||
|
*.tar) tar xf $1 ;;
|
||||||
|
*.tbz2) tar xjf $1 ;;
|
||||||
|
*.tgz) tar xzf $1 ;;
|
||||||
|
*.zip) unzip $1 ;;
|
||||||
|
*.Z) uncompress $1;;
|
||||||
|
*.7z) 7z x $1 ;;
|
||||||
|
*.deb) ar x $1 ;;
|
||||||
|
*.tar.xz) tar xf $1 ;;
|
||||||
|
*.tar.zst) unzstd $1 ;;
|
||||||
|
*) echo "'$1' cannot be extracted via ex()" ;;
|
||||||
|
esac
|
||||||
|
else
|
||||||
|
|
||||||
|
echo "'$1' is not a valid file"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
### ALIASES
|
||||||
|
# Some are inspired from https://gitlab.com/dwt1/dotfiles/-/blob/master/.bashrc
|
||||||
|
|
||||||
|
# navigation
|
||||||
|
alias ..='cd ..'
|
||||||
|
alias ...='cd ../.'
|
||||||
|
alias .3='cd ../../..'
|
||||||
|
alias .4='cd ../../../..'
|
||||||
|
alias .5='cd ../../../../..'
|
||||||
|
|
||||||
|
# vi = vim
|
||||||
|
alias vi='vim'
|
||||||
|
|
||||||
|
# package managers
|
||||||
|
alias upgrade='pacman -Suy && yay -Suy'
|
||||||
|
|
||||||
|
# git
|
||||||
|
alias add='git add'
|
||||||
|
alias branch='git branch'
|
||||||
|
alias commit='git commit'
|
||||||
|
alias clone='git clone'
|
||||||
|
alias pull='git pull'
|
||||||
|
alias push='git push'
|
||||||
|
alias merge='git merge'
|
||||||
|
alias status='git status'
|
||||||
|
alias rebase='git rebase'
|
||||||
|
|
||||||
alias config='/usr/bin/git --git-dir=/home/me/.cfg/ --work-tree=/home/me'
|
alias config='/usr/bin/git --git-dir=/home/me/.cfg/ --work-tree=/home/me'
|
||||||
|
|
Loading…
Reference in a new issue