Page MenuHomePhabricator

D21069.id.diff
No OneTemporary

D21069.id.diff

diff --git a/support/shell/hooks/bash-completion.sh b/support/shell/hooks/bash-completion.sh
--- a/support/shell/hooks/bash-completion.sh
+++ b/support/shell/hooks/bash-completion.sh
@@ -1,9 +1,14 @@
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.
-if [ ! -f "${SCRIPTDIR}/bash-rules.sh" ]; then
+if [ ! -f "${GENERATED_RULES_FILE}" ]; then
+ echo "$0: Generating arc shell completion rules to \"${GENERATED_RULES_FILE}\"..."
arc shell-complete --generate >/dev/null 2>/dev/null
-fi;
+ if [ ! -f "${GENERATED_RULES_FILE}" ]; then
+ echo "$0: Failed to generate arcanist shell completion rules to \"${GENERATED_RULES_FILE}\"." 1>&2
+ fi
+fi
# Source the shell completion rules.
-source "${SCRIPTDIR}/../rules/bash-rules.sh"
+source "${GENERATED_RULES_FILE}"

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 27, 5:40 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7390525
Default Alt Text
D21069.id.diff (931 B)

Event Timeline