Page MenuHomeDevCentral

D2348.diff
No OneTemporary

D2348.diff

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

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)

Event Timeline