You've already forked OpenUxAS-bootstrap
mirror of
https://github.com/AdaCore/OpenUxAS-bootstrap.git
synced 2026-02-12 13:07:23 -08:00
18 lines
578 B
Bash
18 lines
578 B
Bash
|
|
#! /usr/bin/env bash
|
||
|
|
|
||
|
|
# This completion works for zsh (even though the script says "bash" in the
|
||
|
|
# file extension), but we have to find the script directory differently.
|
||
|
|
if [ $ZSH_VERSION ]; then
|
||
|
|
INSTALL_DIR=${0:a:h}
|
||
|
|
else
|
||
|
|
# Assume bash. (Could test with $BASH_VERSION, but we don't have a fallback
|
||
|
|
# plan.)
|
||
|
|
INSTALL_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
|
||
|
|
fi
|
||
|
|
|
||
|
|
_run_example_completions() {
|
||
|
|
COMPREPLY=( $( compgen -W "$( ${INSTALL_DIR}/../run-example --list )" -- "${COMP_WORDS[1]}" ) )
|
||
|
|
}
|
||
|
|
|
||
|
|
complete -F _run_example_completions run-example
|