# You can put files here to add functionality separated per file, which # will be ignored by git. # Files on the custom/ directory will be automatically loaded by the init # script, in alphabetical order. # For example: add yourself some shortcuts to projects you often work on. # # brainstormr=~/Projects/development/planetargon/brainstormr # cd $brainstormr alias brew='env PATH=${PATH//$(pyenv root)\/shims:/} brew' alias cdw='~/workspace' # Attach to tmux # if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then # exec tmux new-session -A -s Default # fi # fkill - kill processes - list only the ones you can kill. Modified the earlier script. fkill() { local pid if [ "$UID" != "0" ]; then pid=$(ps -f -u $UID | sed 1d | fzf -m | awk '{print $2}') else pid=$(ps -ef | sed 1d | fzf -m | awk '{print $2}') fi if [ "x$pid" != "x" ] then echo $pid | xargs kill -${1:-9} fi } # fh - repeat history fh() { print -z $( ([ -n "$ZSH_NAME" ] && fc -l 1 || history) | fzf +s --tac | sed -E 's/ *[0-9]*\*? *//' | sed -E 's/\\/\\\\/g') }