Skip to content

Commit

Permalink
zsh - enhance rg alias to handle paging nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
ryuheechul committed Mar 30, 2023
1 parent 9f41d39 commit fc30019
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions zsh/my_addons/aliases
Original file line number Diff line number Diff line change
Expand Up @@ -316,10 +316,15 @@ alias less='less -r -i'
alias cat='bat'
alias k9s='TERM=xterm COLORTERM=256bit k9s'

# ripgrep
alias rg='rg -p -i'
alias rgc='rg -C'
alias rgc5='rgc 5'
## ripgrep
# alias rg='rg -p -i' # with pretty (-p) and ignore case (-i)
# enhanced the above alias using the function below to apply what's mentioned at https://github.com/BurntSushi/ripgrep/issues/86#issuecomment-1469717706
rg ()
{
env rg --json $@ | delta
}
alias rgc='rg -C' # with context
alias rgc5='rgc 5' # with context value that is 5

alias glow='glow -p -s "$(theme-tone)"'

Expand Down

0 comments on commit fc30019

Please sign in to comment.