Everything I take with me from machine to machine.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
loadout/zsh/aliases

38 lines
851 B

alias grep='grep --color=auto'
alias lal='ls -la'
alias src='cd ~/src/'
alias s='src && ls'
alias gosrc='cd ~/src/go/src'
alias gs='gosrc && ls'
alias t='tmuxn'
alias tmuxn='tmux new -s'
alias ta='tmuxa'
alias tmuxa='tmux attach -d -t'
alias tls='tmux ls'
alias cb='xsel -bi; xsel -bo'
alias rsyncv='rsync -av --progress'
function psgrep {
ps aux | grep -P "[^]]$1"
}
function pskill {
PROCS=$(psgrep "$1")
echo "$PROCS"
echo "$PROCS" | awk '{print $2}' | xargs kill
}
# takes in a search regex and a replace string, and does a recursive
# find/replace inside the current directory. Safe to run on repos with .git
# folders and shit like that
function agsed {
search="$1"
replace="$2"
files=$(ag "$search" -l0)
echo -n "$files" | xargs -0 -n1 echo
echo -n "$files" | xargs -0 sed -i "s/$search/$replace/g"
}