Changeset View
Changeset View
Standalone View
Standalone View
support/shell/hooks/bash-completion.sh
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )" | SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" > /dev/null && pwd )" | ||||
GENERATED_RULES_FILE="${SCRIPTDIR}/../rules/bash-rules.sh" | |||||
# Try to generate the shell completion rules if they do not yet exist. | # Try to generate the shell completion rules if they do not yet exist. | ||||
if [ ! -f "${SCRIPTDIR}/bash-rules.sh" ]; then | if [ ! -f "${GENERATED_RULES_FILE}" ]; then | ||||
arc shell-complete --generate >/dev/null 2>/dev/null | arc shell-complete --generate >/dev/null 2>/dev/null | ||||
fi; | fi; | ||||
# Source the shell completion rules. | # Source the shell completion rules. | ||||
source "${SCRIPTDIR}/../rules/bash-rules.sh" | source "${GENERATED_RULES_FILE}" |