diff --git a/main.go b/main.go index 8a5ca903..c027eb98 100644 --- a/main.go +++ b/main.go @@ -36,6 +36,7 @@ var ( pager bool style string width uint + all bool showAllFiles bool showLineNumbers bool preserveNewLines bool @@ -146,6 +147,8 @@ func validateOptions(cmd *cobra.Command) error { width = viper.GetUint("width") mouse = viper.GetBool("mouse") pager = viper.GetBool("pager") + all = viper.GetBool("all") + fmt.Println("All: ", all) preserveNewLines = viper.GetBool("preserveNewLines") // validate the glamour style @@ -315,7 +318,11 @@ func runTUI(workingDirectory string) error { cfg.WorkingDirectory = workingDirectory - cfg.ShowAllFiles = showAllFiles + if showAllFiles { + cfg.ShowAllFiles = showAllFiles + } else { + cfg.ShowAllFiles = all + } cfg.ShowLineNumbers = showLineNumbers cfg.GlamourMaxWidth = width cfg.GlamourStyle = style