func commonPrefix(a, b string) string {
	var prefix string
	if len(b) < len(a) {
		a, b = b, a
	}
	for i := len(a); i >= 0; i-- {
		if a[:i] == b[:i] {
			prefix = a[:i]
			break
		}
	}
	return prefix
}
commonPrefix returns the longest common prefix of two strings.
package main
import (
	"os"
	"os/user"
	"path/filepath"
	"regexp"
	"strings"
	"unicode/utf8"
	"github.com/jangler/edit"
)
var nonWordRegexp = regexp.MustCompile(`\W`)