Skip to content

Commit f0c3b59

Browse files
committed
feat(argc): add 3rd party fallback completion loader
https://github.com/sigoden/argc
1 parent d6f2798 commit f0c3b59

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

completions/Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ cross_platform = 2to3 \
1616
apt-mark \
1717
aptitude \
1818
arch \
19+
_argc \
1920
arp \
2021
arping \
2122
arpspoof \

completions/_argc

+8
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 --argc-completions bash".
3+
#
4+
# This serves as a fallback in case the completion is not installed otherwise.
5+
6+
eval -- "$("$1" --argc-completions bash 2>/dev/null)"
7+
8+
# ex: filetype=sh

test/fallback/completions/Makefile.am

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
EXTRA_DIST = \
2+
argc \
23
adb \
34
cal \
45
cargo \

test/fallback/completions/argc

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../completions/_argc

0 commit comments

Comments
 (0)