comparison dot_zshrc @ 300:c49fb04cf6da

Autocomplete rg search terms with ctags data
author zegervdv <zegervdv@me.com>
date Tue, 10 Nov 2020 17:53:00 +0100
parents b29fc37fe1f0
children 14492409db21
comparison
equal deleted inserted replaced
299:1070d75463db 300:c49fb04cf6da
184 fi 184 fi
185 } 185 }
186 zle -N fancy-ctrl-z 186 zle -N fancy-ctrl-z
187 bindkey '^Z' fancy-ctrl-z 187 bindkey '^Z' fancy-ctrl-z
188 188
189 # Ctags based completion for rg
190 _rg() {
191 if (( CURRENT == 2 )); then
192 compadd $(cut -f 1 tags tmp/tags 2>/dev/null | grep -v '!_TAG')
193 fi
194 }
195
196 compdef _rg rg
197
189 # Aliases 198 # Aliases
190 alias l="ls -haltr --color" 199 alias l="ls -haltr --color"
191 alias ll="ls -haltr --color" 200 alias ll="ls -haltr --color"
192 alias ls="ls --color" 201 alias ls="ls --color"
193 alias xclip='xclip -selection clipboard' 202 alias xclip='xclip -selection clipboard'