diff --git a/demo.go b/demo.go index 8cb9035..f7f18b1 100644 --- a/demo.go +++ b/demo.go @@ -33,18 +33,18 @@ const ( // enabled. FlagAutoTimeout = "auto-timeout" - // FlagBreakPoint is the flag for doing`auto` but with breakpoint + // FlagBreakPoint is the flag for doing`auto` but with breakpoint. FlagBreakPoint = "with-breakpoints" // FlagContinueOnError is the flag for steps continue running if - // there is an error + // there is an error. FlagContinueOnError = "continue-on-error" // FlagContinuously is the flag for running the demos continuously without // any end. FlagContinuously = "continuously" - // DryRun + // DryRun only prints the command in the stdout. FlagDryRun = "dry-run" // FlagHideDescriptions is the flag for hiding the descriptions. @@ -53,7 +53,7 @@ const ( // FlagImmediate is the flag for disabling the text animations. FlagImmediate = "immediate" - // NoColor true to print without colors, special characters + // NoColor true to print without colors, special characters for writing into file. FlagNoColor = "no-color" // FlagSkipSteps is the flag for skipping n amount of steps. @@ -77,7 +77,6 @@ func New() *Demo { &cli.BoolFlag{ Name: FlagAuto, Aliases: []string{"a"}, - Value: true, Usage: "run the demo in automatic mode, " + "where every step gets executed automatically", }, diff --git a/run.go b/run.go index c420319..1ef4be8 100644 --- a/run.go +++ b/run.go @@ -235,8 +235,8 @@ func (s *step) echo(current, max int) { prepared = append( prepared, p( - "# %s [%d/%d]:\n", - x, current, max, + "# %s [%d/%d]%s\n", + x, current, max, colon, ), ) } else { @@ -259,8 +259,8 @@ func (s *step) execute() error { p = fmt.Sprintf } - cmdString := p("%s", strings.Join(s.command, " \\\n ")) - s.print("```\n" + cmdString + "\n```\n") + cmdString := p("> %s", strings.Join(s.command, " \\\n ")) + s.print(cmdString) if err := s.waitOrSleep(); err != nil { return fmt.Errorf("unable to execute step: %v: %w", s, err) }