diff --git a/next/last.go b/next/last.go index d4e2ada..a6c5761 100644 --- a/next/last.go +++ b/next/last.go @@ -3,6 +3,7 @@ package next import ( "bytes" "errors" + "fmt" "log" "os/exec" "regexp" @@ -45,5 +46,6 @@ func Last() { if err != nil { log.Fatalf("um last: %v", err) } - log.Println(s) + // send to stdout, not stderr as is default for log.Print: + fmt.Println(s) } diff --git a/next/next.go b/next/next.go index 3722d6a..011d60c 100644 --- a/next/next.go +++ b/next/next.go @@ -97,6 +97,8 @@ func emacsNext(f string, tags string) error { if err != nil { return err } + // NOTE: sends to stderr : is this what we want? + // if we decide to pipe the filename out, yes. log.Print(string(out)) return nil } diff --git a/sort/sort.go b/sort/sort.go index 109ab46..f6b8a25 100644 --- a/sort/sort.go +++ b/sort/sort.go @@ -116,6 +116,7 @@ func Sort(args []string) { if opts.Write.Val { Write(opts.Key.Val, out) } else { + // to stdout fmt.Print(out) } }