File tree Expand file tree Collapse file tree 4 files changed +27
-0
lines changed
test/fallback/completions Expand file tree Collapse file tree 4 files changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -401,6 +401,7 @@ bashcomp_DATA = 2to3 \
401
401
smartctl \
402
402
smbclient \
403
403
snownews \
404
+ _sops \
404
405
sqlite3 \
405
406
ss \
406
407
ssh \
Original file line number Diff line number Diff line change
1
+ # 3rd party completion loader for commands using -*- shell-script -*-
2
+ # version 1 of the https://cli.urfave.org library.
3
+ #
4
+ # This serves as a fallback in case the completion is not installed otherwise.
5
+
6
+ # https://github.com/urfave/cli/blob/v1-maint/docs/v1/manual.md#bash-completion
7
+ # https://github.com/urfave/cli/blob/v1-maint/autocomplete/bash_autocomplete
8
+ _comp_cmd__urfave_cli_v1 ()
9
+ {
10
+ local cur prev words cword comp_args
11
+ _comp_initialize -- " $@ " || return
12
+
13
+ local compcmd=(" ${words[@]: 0: cword} " )
14
+ if [[ $cur == -* ]]; then
15
+ compcmd+=(" $cur " )
16
+ fi
17
+ compcmd+=(--generate-bash-completion)
18
+
19
+ _comp_compgen_split -- " $( " ${compcmd[@]} " 2> /dev/null) "
20
+ } &&
21
+ complete -o bashdefault -o default -o nospace \
22
+ -F _comp_cmd__urfave_cli_v1 " $1 "
23
+
24
+ # ex: filetype=sh
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ EXTRA_DIST = \
38
38
runuser \
39
39
rustup \
40
40
slackpkg \
41
+ sops \
41
42
su \
42
43
svn \
43
44
svnadmin \
Original file line number Diff line number Diff line change
1
+ ../../../completions/_sops
You can’t perform that action at this time.
0 commit comments