Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal Pager is blank when using delta as pager for git diff #11700

Open
1 task done
fitzypop opened this issue May 11, 2024 · 2 comments
Open
1 task done

Terminal Pager is blank when using delta as pager for git diff #11700

fitzypop opened this issue May 11, 2024 · 2 comments
Labels
defect [core label] git Git integration feedback terminal Feedback for terminal integration, shell commands, etc

Comments

@fitzypop
Copy link

fitzypop commented May 11, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Zed Terminal Pager does not work with git-delta as a replacement for the default git diff pager. This tool works in Vscode Terminal, and all my other shells.

Steps to Reproduce:

  • Install delta
    • I used cargo install git-delta
    • Available in most package managers, install it
  • Use delta as pager in git conifg
  • Open a git repo in Zed
  • Make local changes to a file and save file
  • Enter git diff in Zed terminal

Expected Results:

  • Terminal should show delta style git diff, based on git config
    • Pager should "exit" early for short changes, i.e. no prompt or navigation needed because it fits on a "single page"
    • Longer changes should show diff and nav prompt, i.e. : at the bottom

Actual Results:

  • Terminal flashes for split second
  • Pager doesn't show any text
  • The only thing shown is the prompt at the bottom

I like to use delta, instead of the default pager, for my git diffs. I use it throughout my personal and professional dev envs, and it works well with other terminals and shells. But in Zed Terminal, when I enter git diff and delta is the pages in git config, the terminal goes blank. The only thing I can see is the : prompt at the bottom of the terminal.

The default git diff pager works in Zed Terminal.

I've used delta and my current config in Alacritty, Gnome Shell, Macos Terminal and iTerm, Kitty, and Vscode terminal without issues.

Not sure if it's relevant, but I use fish with starship.rs, instead of bash or zsh But the bug occurs in all 3 shells, and with or without starship shell active.

Config lives in git config file at ~/.config/git/config and looks like this:

[user]
	name = ...
	email = ...
[fetch]
	prune = true
[pull]
	ff = only
[init]
	defaultBranch = main

# delta config
# To Install: cargo install git-delta
[core]
	pager = delta
[delta]
	line-numbers = true
	file-style = bold yellow ul
	file-decoration-style = none
[interactive]
	diffFilter = delta --color-only

Environment

Zed: v0.134.4 (Zed)
OS: macOS 14.4.1
Memory: 16 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

vscode example with delta
Screenshot 2024-05-11 at 7 58 03 AM

zed example with delta
Screenshot 2024-05-11 at 7 58 51 AM

zed example with default git config
image

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

Zed.log

@fitzypop fitzypop added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels May 11, 2024
@Moshyfawn Moshyfawn added terminal Feedback for terminal integration, shell commands, etc git Git integration feedback and removed triage Maintainer needs to classify the issue labels May 11, 2024
@fitzypop
Copy link
Author

fitzypop commented May 11, 2024

I just updated Zed and did a fresh install of delta, still using cargo.

The diff now appears, but looks like some color strings are showing too?

image

@mgoodness
Copy link

I'm experiencing this as well, albeit with different config for delta. I don't get the diff at all; just the color strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] git Git integration feedback terminal Feedback for terminal integration, shell commands, etc
Projects
None yet
Development

No branches or pull requests

4 participants