~mkhl/xplor

e1a76a68c7aaab373d8b258668e393f60685c456 — Martin Kühl 10 months ago edfed8b
Handle entries containing regexp meta characters
1 files changed, 2 insertions(+), 1 deletions(-)

M xplor.go
M xplor.go => xplor.go +2 -1
@@ 14,6 14,7 @@ import (
	"os"
	"os/exec"
	"path/filepath"
	"regexp"
	"strings"

	"9fans.net/go/acme"


@@ 258,7 259,7 @@ func selectEntry(path string) error {
	steps.WriteString("0") // beginning
	for depth, name := range split(path) {
		tabs := strings.Repeat(tab, depth)
		fmt.Fprintf(&steps, "+/^..%s%s/", tabs, name) // next entry
		fmt.Fprintf(&steps, "+/^..%s%s/", tabs, regexp.QuoteMeta(name)) // next entry
	}
	if err := win.Addr("%s", steps.String()); err != nil {
		return err