Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F56877889
D2348.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D2348.diff
View Options
diff --git a/files/opt/arcanist/support/shell/rules/bash-rules.sh b/files/opt/arcanist/support/shell/rules/bash-rules.sh
new file mode 100644
--- /dev/null
+++ b/files/opt/arcanist/support/shell/rules/bash-rules.sh
@@ -0,0 +1,45 @@
+_arcanist_complete_arc ()
+{
+ COMPREPLY=()
+
+ RESULT=$(echo | arc shell-complete \
+ --current ${COMP_CWORD} \
+ -- \
+ "${COMP_WORDS[@]}" \
+ 2>/dev/null)
+
+ if [ $? -ne 0 ]; then
+ return $?
+ fi
+
+ if [ "$RESULT" == "<compgen:file>" ]; then
+ RESULT=$( compgen -A file -- ${COMP_WORDS[COMP_CWORD]} )
+ fi
+
+ local IFS=$'\n'
+ COMPREPLY=( $RESULT )
+}
+complete -F _arcanist_complete_arc -o filenames arc
+
+_arcanist_complete_phage ()
+{
+ COMPREPLY=()
+
+ RESULT=$(echo | phage shell-complete \
+ --current ${COMP_CWORD} \
+ -- \
+ "${COMP_WORDS[@]}" \
+ 2>/dev/null)
+
+ if [ $? -ne 0 ]; then
+ return $?
+ fi
+
+ if [ "$RESULT" == "<compgen:file>" ]; then
+ RESULT=$( compgen -A file -- ${COMP_WORDS[COMP_CWORD]} )
+ fi
+
+ local IFS=$'\n'
+ COMPREPLY=( $RESULT )
+}
+complete -F _arcanist_complete_phage -o filenames phage
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Nov 11, 08:49 (3 d, 18 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
4245717
Default Alt Text
D2348.diff (1 KB)
Attached To
Mode
D2348: Provide bash completion support file
Attached
Detach File
Event Timeline
Log In to Comment