Major Feature: preview wrapping
By default, long lines in preview are now wrapped.
This impacts text previews, with or without syntactic coloring, unified diffs, and TTY previews
This can be toogled with :toggle_preview_wrap (shortcut :wrap), and wrap_previews: false in the conf disables it on start
Major Feature: git diff preview, and many git related enhancements
The libgit2 library has been replaced by gix. With this change, broot becomes pure Rust, which simplifies compilation (no C compiler needed anymore).
A unified diff preview is now the default preview of a file with a git change (modified, staged, added, renamed or in conflict) when git statuses are displayed. :preview_diff shows it for any file.
Best way to try: in a repo with changes, do br -dgg
- tab and shift-tab navigate between git-interesting files and diff chunks just like for content search matches
- ctrl-→ opens the file at the selected chunk, and ctrl-← brings you back to the diff
- new skin entries:
diff_added,diff_removed,diff_line_number - in detached HEAD state, the status line shows the short commit id instead of
HEAD - git status: staged files are shown (
Aadded,Sstaged modification,Rrenamed); newgit_status_stagedskin entry - git status of a subdirectory of a big repository is computed on that subdirectory only, which is faster
- git status: an untracked directory gets the
Nmark too - the status line shows how many commits the branch is ahead (
↑) or behind (↓) its upstream {git-root}and{git-name}now work when the selection is a file- alt-g toggles the git status filter (
:toggle_git_status). Status line suggests using it in git repo. -ggshows only the files with a git status (same as--git-status),-Gremoves one level of git information- the Kitty keyboard protocol is now used by default when the terminal supports it, which notably makes
altcombinations work on macOS terminals; multi-key combinations without modifier still needenable_kitty_keyboard: true- I'll watch this as this may have unwanted effects, like time related difficulty for some combinations - feedback welcome
Other Changes
- fix panic when previewing an image with 16 bits per channel, or HDR - Fix #1209
- alt-arrows are bound like ctrl-arrows (panels, root up/down), as macOS captures ctrl-arrows; hints and help show the alt ones on macOS
- arrow keys scroll the tty preview
:select_lastgoes to the end of a directory preview- the tty preview shows its line count
:preview_autocancels the effect of eg:preview_text, going back to automatically choosing the preview mode