Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Small terminal width breaks clickable file paths #2

@do-me

Description

@do-me

When the file path is not printed on one line it's not clickable anymore. Eg this link is not clickable as a line break is printed in between:

Found 641 relevant chunks from 158 files for query "rust release" in 100.66 ms. Top 10 results:
┌───────┬───────────────────────────────────────────────────────────────────────────────────────────┬──────────────────────────────────────────────────────────────────────────────────────────┐
│ Score ┆ Matching Text Chunk                                                                       ┆ File Path                                                                                │
╞═══════╪═══════════════════════════════════════════════════════════════════════════════════════════╪══════════════════════════════════════════════════════════════════════════════════════════╡
│ 0.23  ┆ Git local with ...                                                                        ┆ file:///Users/dome/Library/Mobile%20Documents/iCloud~md~obsidian/Documents/Notes/2025-01 │
│       ┆ git commit...                                                                             ┆ -20_18-36-24.md                                                                          │
├╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┼╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌┤

Possible solution: fixed width.

  • Column 1 with score could have a width of only 6-7 chars to display the floating number well.
  • Column 2 is the text chunk where line breaks are not an issue at the moment. As this is the most important information it could get 60-70% of the terminal width.
  • Column 3 is the file path that could get the remaining 20% but the trick here could be to allow the file path to overflow so it will always be printed on one line only.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions