# HG changeset patch # User zegervdv # Date 1643186235 -3600 # Node ID aee830df7a88d672cd7b0532895e92bf4f5b8923 # Parent 22fb4745cb1b3e92ee096de5ac2fea2691f6151d Add zsh completions for fd and rg diff -r 22fb4745cb1b -r aee830df7a88 .chezmoiexternal.toml --- 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" diff -r 22fb4745cb1b -r aee830df7a88 dot_zshrc --- 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"