Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18110328
D21069.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
931 B
Referenced Files
None
Subscribers
None
D21069.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Tue, Aug 12, 6:35 PM (2 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
8666487
Default Alt Text
D21069.diff (931 B)
Attached To
Mode
D21069: Some suggestions for "bash-completion.sh"
Attached
Detach File
Event Timeline
Log In to Comment