Last active
October 30, 2024 17:36
-
-
Save iloveitaly/b342092217821c92e6d478ca501af342 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# make sure you execute this *after* asdf or other version managers are loaded | |
plugin_dir="${0:A:h}" | |
cache_file="$plugin_dir/_rg" | |
if (( $+commands[rg] )); then | |
if [[ ! -f "$cache_file" || ! $(/usr/bin/find "$cache_file" -mtime -15 2>/dev/null) ]]; then | |
rg --generate=complete-zsh > "$cache_file" | |
fi | |
# rg completion script cannot be executed directly | |
fpath+=$plugin_dir | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment