mirror of
https://github.com/micropython/micropython.git
synced 2026-01-06 12:10:13 +01:00
tools/ci.sh: Add --bash-completion option.
Signed-off-by: Jeff Epler <jepler@unpythonic.net>
This commit is contained in:
committed by
Damien George
parent
293bb0e575
commit
70c4ffa770
11
tools/ci.sh
11
tools/ci.sh
@@ -1005,11 +1005,22 @@ function _ci_help {
|
||||
exit
|
||||
}
|
||||
|
||||
function _ci_bash_completion {
|
||||
echo "alias ci=\"$(readlink -f "$0")\"; complete -W '$(grep '^function ci_' $0 | awk '{print $2}' | sed 's/^ci_//')' ci"
|
||||
}
|
||||
|
||||
function _ci_main {
|
||||
case "$1" in
|
||||
(-h|-?|--help)
|
||||
_ci_help
|
||||
;;
|
||||
(--bash-completion)
|
||||
_ci_bash_completion
|
||||
;;
|
||||
(-*)
|
||||
echo "Unknown option: $1" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
(*)
|
||||
set -e
|
||||
cd $(dirname "$0")/..
|
||||
|
||||
Reference in New Issue
Block a user