diff --git a/e b/e new file mode 100755 index 0000000..0c9e622 --- /dev/null +++ b/e @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +editors="" + +for editor in ed nex nvi vim; do + if command -v "$editor" >/dev/null; then + if test -z "$editors"; then + editors="$editor" + else + editors="$editors\n$editor" + fi + + fi +done + +random_editor="$(echo "$editors" | shuf | head -n 1)" + +$random_editor "$@"