Skip to content

Commit 272ab45

Browse files
committed
feat(nox): add fallback 3rd party completion loader
1 parent a02a7bc commit 272ab45

File tree

4 files changed

+12
-0
lines changed

4 files changed

+12
-0
lines changed

completions/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ bashcomp_DATA = 2to3 \
287287
ngrep \
288288
nmap \
289289
_nmcli \
290+
_nox \
290291
nproc \
291292
nslookup \
292293
nsupdate \

completions/_nox

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

test/fallback/completions/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ EXTRA_DIST = \
1818
mount.linux \
1919
newgrp \
2020
nmcli \
21+
nox \
2122
renice \
2223
repomanage \
2324
reptyr \

test/fallback/completions/nox

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

0 commit comments

Comments
 (0)