Skip to content

Messy output when trying to show a binary fileΒ #8

@chshersh

Description

@chshersh

The entire layout just goes horribly wrong.

image

Solution:

  1. Check that the file is binary.
  2. Don't call bat if the file is binary (happens here)
    • github-tui/lib/fs/fs.ml

      Lines 32 to 37 in b2c44c1

      let read_file_contents path =
      let cmd =
      "bat --style=numbers,changes --color=always --italic-text=always \
      --paging=never --terminal-width=80 " ^ path
      in
      let contents = Shell.proc_stdout cmd in
  3. Instead, display some standard text saying that the file is binary
  4. Additionally, use the eae8 icon for the file icon when the file is binary
  • image

Metadata

Metadata

Assignees

Labels

component: UIIssues related to changing UIgood first issueGood for newcomerspriority: highIssues with high priority, should addressed sooner than anything elseresolution: doneIssues that we solved successfullytype: bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions