Skip to content

Commit 7cf1b3f

Browse files
committed
feat(stripe): add 3rd party fallback completion loader
https://github.com/stripe/stripe-cli
1 parent 0192486 commit 7cf1b3f

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

completions/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ cross_platform = 2to3 \
423423
sshow \
424424
_stern \
425425
strace \
426+
_stripe \
426427
strings \
427428
_su \
428429
sudo \

completions/_stripe

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# 3rd party completion loader for commands emitting -*- shell-script -*-
2+
# their completion using "$cmd completion --write-to-stdout --shell bash".
3+
#
4+
# This serves as a fallback in case the completion is not installed otherwise.
5+
6+
eval -- "$("$1" completion --write-to-stdout --shell bash 2>/dev/null)"
7+
8+
# ex: filetype=sh

test/fallback/completions/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ EXTRA_DIST = \
4949
slackpkg \
5050
sops \
5151
stern \
52+
stripe \
5253
su \
5354
svn \
5455
svnadmin \

test/fallback/completions/stripe

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../completions/_stripe

0 commit comments

Comments
 (0)