-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(pipenv): add fallback 3rd party completion loader (#1020)
* feat(pipenv): add fallback 3rd party completion loader https://pipenv.pypa.io/en/latest/shell/#shell-completion Co-authored-by: Koichi Murase <[email protected]>
- Loading branch information
1 parent
e2e11e6
commit 6ecf5bd
Showing
4 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -316,6 +316,7 @@ bashcomp_DATA = 2to3 \ | |
pidof \ | ||
pine \ | ||
ping \ | ||
_pipenv \ | ||
pkg-config \ | ||
pkg-get \ | ||
pkg_delete \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# 3rd party completion loader for commands emitting -*- shell-script -*- | ||
# their completion using "_${cmdname^^}_COMPLETE=bash_source $cmd". | ||
# This pattern is used by programs built with https://click.palletsprojects.com | ||
# | ||
# This serves as a fallback in case the completion is not installed otherwise. | ||
|
||
eval -- "$( | ||
# shellcheck disable=SC2154 | ||
ucname="${cmdname^^}" | ||
ucname=${ucname//-/_} | ||
export "_${ucname}_COMPLETE=bash_source" | ||
"$1" 2>/dev/null | ||
)" | ||
|
||
# ex: filetype=sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ EXTRA_DIST = \ | |
newgrp \ | ||
nmcli \ | ||
nox \ | ||
pipenv \ | ||
renice \ | ||
repomanage \ | ||
reptyr \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../../../completions/_pipenv |