Skip to content

Commit

Permalink
feat(rg): add fallback 3rd party completion loader
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Apr 2, 2024
1 parent a89cde2 commit 7e4cc2f
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions completions/Makefile.am
Expand Up @@ -377,6 +377,7 @@ bashcomp_DATA = 2to3 \
_reptyr \
resolvconf \
_rfkill \
_rg \
ri \
rmlist \
rmmod \
Expand Down
8 changes: 8 additions & 0 deletions completions/_rg
@@ -0,0 +1,8 @@
# 3rd party completion loader for commands emitting -*- shell-script -*-
# their completion using "$cmd --generate complete-bash".
#
# This serves as a fallback in case the completion is not installed otherwise.

eval -- "$("$1" --generate complete-bash 2>/dev/null)"

# ex: filetype=sh
1 change: 1 addition & 0 deletions test/fallback/completions/rg

0 comments on commit 7e4cc2f

Please sign in to comment.