Compare commits

..

No commits in common. "f2976c66e3c93c2033b40698d5a5e5aec42dfb5d" and "15f7db8d3e673b81428f578fb9c495b86b487510" have entirely different histories.

2 changed files with 3 additions and 14 deletions

2
.gitignore vendored
View File

@ -1,2 +0,0 @@
**/__debug_bin*
main

View File

@ -3,10 +3,8 @@ package main
import (
"flag"
"fmt"
"os"
"git.schreifuchs.ch/schreifuchs/pat/pkg/cat"
"git.schreifuchs.ch/schreifuchs/pat/pkg/clip"
"git.schreifuchs.ch/schreifuchs/pat/pkg/ignore"
)
@ -20,15 +18,13 @@ func main() {
cats, err := cat.Path(flag.Args()...)
if err != nil {
fmt.Println(err.Error())
os.Exit(1)
panic(err)
}
if *ignorePath != "" {
i, err := ignore.FindGitignore(*ignorePath)
if err != nil {
fmt.Printf("can't get gitignore: %v", err)
os.Exit(1)
panic(err)
}
cats = cats.Ignored(i)
@ -37,11 +33,6 @@ func main() {
cats = cats.Ignored(ignore.Filesystem{})
}
out := cats.ToString(DELEMITTER)
fmt.Print(out)
fmt.Print(cats.ToString(DELEMITTER))
if err = clip.Copy(out); err != nil {
fmt.Println(err.Error())
os.Exit(1)
}
}