Added color demo and rgv (rip-grep vim)
This commit is contained in:
parent
b2478f3cdf
commit
94855c05a1
24
zsh/utility
24
zsh/utility
@ -15,7 +15,6 @@ function notes() { NOTE="$NOTE_PATH/$1$NOTE_EXTENSION"; [ $1 ] && [ -f $NOTE ] &
|
||||
|
||||
# --- GIT -----------------------------------------------------
|
||||
alias gitbranchcleanup='git branch -d $(git branch | sed -E "/develop|master|\*/d")'
|
||||
|
||||
alias fix='vim $(git diff --name-only | uniq) -p';
|
||||
|
||||
|
||||
@ -51,3 +50,26 @@ alias qd='popd';
|
||||
alias ds='dirs';
|
||||
alias cdo='cd $(xclip -o)';
|
||||
alias pdo='pwd | xclip';
|
||||
|
||||
alias rgv='EDIT_RIP_GREP_FILE_MATCHES';
|
||||
|
||||
EDIT_RIP_GREP_FILE_MATCHES() {
|
||||
[ $EDITOR = "vim" ] \
|
||||
&& $EDITOR -p $(rg -l $1) \
|
||||
|| $EDITOR $(rg -l $1) ;
|
||||
}
|
||||
|
||||
|
||||
alias color_demo='DISPLAY_ALL_TERMINAL_COLORS'
|
||||
|
||||
DISPLAY_ALL_TERMINAL_COLORS() {
|
||||
for x in {0..8}; do
|
||||
for i in {30..37}; do
|
||||
for a in {40..47}; do
|
||||
echo -ne "\e[$x;$i;$a""m\\\e[$x;$i;$a""m\e[0;37;40m "
|
||||
done
|
||||
echo
|
||||
done
|
||||
done
|
||||
echo ""
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user