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 \
401401 smartctl \
402402 smbclient \
403403 snownews \
404+ _sops \
404405 sqlite3 \
405406 ss \
406407 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 = \
3838 runuser \
3939 rustup \
4040 slackpkg \
41+ sops \
4142 su \
4243 svn \
4344 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