Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3764775
D2348.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
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
Sat, Nov 23, 08:14 (18 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2256653
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