diff --git a/main.go b/main.go index 840e36a..be6ad56 100644 --- a/main.go +++ b/main.go @@ -9,6 +9,7 @@ import ( "io" "os" "sort" + "strings" "github.com/fatih/color" "github.com/mattn/go-colorable" @@ -119,6 +120,11 @@ func main() { os.Exit(exitOK) } + // If executed as 'ungron' set the --ungron flag + if strings.HasSuffix(os.Args[0], "ungron") { + ungronFlag = true + } + // Determine what the program's input should be: // file, HTTP URL or stdin var rawInput io.Reader