style tables and add out/err highlights

improve projector open error message if an invalid monitor index is passed.
it now prints the monitor name and suggests `gobs-cli prj ls-m`

improve error message for sceneitem commands if a scene item in a group is queried without the --group flag.
This commit is contained in:
2025-06-21 06:41:12 +01:00
parent d699939298
commit 7147c3f1ca
11 changed files with 424 additions and 150 deletions

View File

@@ -60,7 +60,11 @@ func (cmd *RecordStopCmd) Run(ctx *context) error {
if err != nil {
return err
}
fmt.Fprintf(ctx.Out, "%s", fmt.Sprintf("Recording stopped successfully. Output file: %s\n", resp.OutputPath))
fmt.Fprintf(
ctx.Out,
"%s",
fmt.Sprintf("Recording stopped successfully. Output file: %s\n", ctx.Style.Highlight(resp.OutputPath)),
)
return nil
}
@@ -169,7 +173,7 @@ func (cmd *RecordDirectoryCmd) Run(ctx *context) error {
if err != nil {
return err
}
fmt.Fprintf(ctx.Out, "Current recording directory: %s\n", resp.RecordDirectory)
fmt.Fprintf(ctx.Out, "Current recording directory: %s\n", ctx.Style.Highlight(resp.RecordDirectory))
return nil
}
@@ -180,6 +184,6 @@ func (cmd *RecordDirectoryCmd) Run(ctx *context) error {
return err
}
fmt.Fprintf(ctx.Out, "Recording directory set to: %s\n", cmd.RecordDirectory)
fmt.Fprintf(ctx.Out, "Recording directory set to: %s\n", ctx.Style.Highlight(cmd.RecordDirectory))
return nil
}