76 lines
1.7 KiB
Bash
76 lines
1.7 KiB
Bash
###############################################################################
|
|
# File .bash_aliases
|
|
# jul.io
|
|
###############################################################################
|
|
|
|
# ls aliases
|
|
alias ll='ls -la'
|
|
alias lla='ls -htlr -A'
|
|
alias l='ls -l'
|
|
|
|
# change directory
|
|
alias ..='cd ..'
|
|
alias ...='cd ../..'
|
|
alias ....='cd ../../..'
|
|
alias .....='cd ../../../..'
|
|
alias p='cd -'
|
|
|
|
# go=move to directory and instantly list its contents
|
|
# everyone needs this ;-)
|
|
go(){
|
|
cd $@
|
|
ls -l
|
|
}
|
|
|
|
# making git-life easier
|
|
gitc(){
|
|
git commit -a -m "$1"
|
|
#TODO: switch back to vim via fg command if we paused vim by pressing <C-z> to commit our changes
|
|
}
|
|
alias gitp='git push origin'
|
|
alias gitch='git checkout'
|
|
|
|
# misc
|
|
alias px="ps auxf"
|
|
alias o="xdg-open"
|
|
|
|
# pretty print json
|
|
alias ppjson='python -c "import sys, json; print json.dumps(json.load(sys.stdin), sort_keys=True, indent=4)"'
|
|
|
|
# my favorite typos
|
|
alias gerp=grep
|
|
alias gpre=grep
|
|
alias gre=grep
|
|
alias grpe=grep
|
|
alias gep=grep
|
|
alias wcgrp=wcgrep
|
|
alias wcgerp=wcgrep
|
|
alias wcgrpe=wcgrep
|
|
alias wcgre=wcgrep
|
|
alias tial=tail
|
|
alias snv=svn
|
|
alias iv=vi
|
|
alias vo=vi
|
|
alias vu=vi
|
|
alias chmkd=chmod
|
|
alias pign=ping
|
|
|
|
# other stuff
|
|
alias eierabend='xflock4 ; systemctl suspend --no-wall'
|
|
alias updgrade='sudo aptitude update && sudo aptitude upgrade -y'
|
|
|
|
# better passwords!
|
|
alias apg='apg -M sncl -n 15 -m 10 -x 20'
|
|
|
|
# pssh! when not using ansible, puppet, whatever, parallel-ssh enables you to do the same stuff on several servers with one command
|
|
alias pssh='parallel-ssh'
|
|
|
|
# sudo aliases
|
|
# switch to root with sudo but preserve your user-settings
|
|
alias sudei='sudo -Ei'
|
|
alias svim='sudo -E vim'
|
|
alias telnet='echo use the curl method: curl telnet:\/\/<ip>:<port>'
|
|
|
|
# hopefully, there's ack-grep installed on the system...
|
|
alias ag='ack'
|