Skip to content

fix(repo search): Fix missing color reset and broken links in Bash

Mat Gautron requested to merge Mat.G/cli:fix_colors_not_reset_bash into main

Description

Colors were broken because the table will truncate strings that are too long according to terminal width. Since the table was given a string which contained the color reset characters, there was a chance these were truncated away.

Since the URL and path were technically part of the same cell, they would get truncated even with a wide terminal.

This MR addresses this by enabling wrapping. This works nicely to fix the unnecessary truncating, and prevents truncating URLs unnecessarily, however it can lead to a less readable output with a tiny terminal. See Screenshots.

Related Issues

repo search does not properly reset terminal co... (#7365 - closed)

How has this been tested?

Screenshots (if appropriate):

Before (broken colors)

20231007_13h43m32s_grim

After (colors fixed)

20231007_13h44m06s_grim

Before (tiny width)

Colors are still broken, but by chance nothing colorful was truncated. Adjusing terminal width after output will not change anything

20231007_13h42m20s_grim

After (tiny width)

Adjusting terminal width will re-arrange things to look better.

20231007_13h44m23s_grim

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation
  • Chore (Related to CI or Packaging to platforms)
  • Test gap
Edited by Oscar Tovar

Merge request reports