renamed utility

This commit is contained in:
Wryn Wagner
2021-09-16 14:55:50 -06:00
parent 3529b3b62e
commit 619f2392ec
2 changed files with 22 additions and 79 deletions

22
zsh/alias Normal file
View File

@ -0,0 +1,22 @@
#!/bin/zsh
# ---------------------------------------------------------------------
alias restart='clear; source ~/.zshrc; echo'
alias pd='pushd';
alias qd='popd';
alias lspd='dirs';
alias bp='bpython';
alias pdo='pwd | xclip'; # [p]aste current [d]irectory [o]n clipboard
alias cdo='cd $(xclip -o)'; # [cd] to directory [o]n clipboard
alias fix='vim $(git diff --name-only | uniq) -p';
# ---------------------------------------------------------------------
alias erg='EDIT_RIP_GREP_FILE_MATCHES';
EDIT_RIP_GREP_FILE_MATCHES() {
[ $EDITOR = "vim" ] \
&& $EDITOR -p $(rg --color=never -l $1 ) \
|| $EDITOR $(rg --color=never -l $1) ;
}