Mercurial > dotfiles
changeset 534:aee830df7a88
Add zsh completions for fd and rg
author | zegervdv <zegervdv@me.com> |
---|---|
date | Wed, 26 Jan 2022 09:37:15 +0100 |
parents | 22fb4745cb1b |
children | f10b89e9aff3 |
files | .chezmoiexternal.toml dot_zshrc |
diffstat | 2 files changed, 12 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/.chezmoiexternal.toml Tue Jan 25 21:54:03 2022 +0100 +++ b/.chezmoiexternal.toml Wed Jan 26 09:37:15 2022 +0100 @@ -33,3 +33,13 @@ type = "file" url = "https://github.com/zsh-users/zsh-autosuggestions/raw/master/zsh-autosuggestions.zsh" refreshPeriod = "168h" + +[".zsh/completions/_fd"] + type = "file" + url = "https://github.com/sharkdp/fd/raw/master/contrib/completion/_fd" + refreshPeriod = "168h" + +[".zsh/completions/_rg"] + type = "file" + url = "https://github.com/BurntSushi/ripgrep/raw/master/complete/_rg" + refreshPeriod = "168h"
--- a/dot_zshrc Tue Jan 25 21:54:03 2022 +0100 +++ b/dot_zshrc Wed Jan 26 09:37:15 2022 +0100 @@ -5,6 +5,8 @@ source ~/.zsh/zsh-autosuggestions.zsh +fpath=(~/.zsh/completions $fpath) + export TERM=xterm-256color export LC_ALL=$LANG @@ -210,15 +212,6 @@ zle -N fancy-ctrl-z bindkey '^Z' fancy-ctrl-z -# Ctags based completion for rg -_rg() { - if (( CURRENT == 2 )); then - compadd $(cut -f 1 tags tmp/tags 2>/dev/null | grep -v '!_TAG') - fi -} - -compdef _rg rg - # Aliases alias l="ls -haltr" alias ll="ls -haltr"