Initial cut of `onos-group` script for running a subset of commands
against multiple ONOS instances:

  - onos-install
  - onos-push-keys
  - onos-kill
  - onos-patch-vm
  - onos-uninstall

onos-group is simply a wrapper that does minimal sanity checks. New
commands are added by adding them to the GOPTS list in ogroup-opts.

Reference: ONOS-536

Change-Id: Ib3055491fec80e8759e87594e81a88285546deaf
diff --git a/tools/dev/bash_profile b/tools/dev/bash_profile
index 79717e3..9bec1aa 100644
--- a/tools/dev/bash_profile
+++ b/tools/dev/bash_profile
@@ -146,11 +146,13 @@
        printf "${cdf} : no such cell\n" && return 1
   fi
 
-  if [ -z "$EDITOR" ]; then
-    vi ${cpath}${cdf}
+  if [ -z "${EDITOR}" ] || [ -x "$(which ${EDITOR})" ]; then
+    unset EDITOR && vi ${cpath}${cdf}
   else
     $EDITOR ${cpath}${cdf}
   fi
   ($apply) && cell ${cdf}
-
 }
+
+# autocomplete for certain utilities
+. ${ONOS_ROOT}/tools/test/bin/ogroup-opts