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

bat breaks zsh-async #2380

Open
pointlessone opened this issue Oct 24, 2022 · 2 comments
Open

bat breaks zsh-async #2380

pointlessone opened this issue Oct 24, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@pointlessone
Copy link

What steps will reproduce the bug?

  1. Use zsh with zsh-async prompt (Pure or Spaceship, for example)
  2. alias cat=bat
  3. Start a new shell

What happens?

zsh-async doesn't work. It seem to start the process (there's a bat child process) but the prompt never update the async parts.

What did you expect to happen instead?

I expected bat to be a drop-in replacement for cat and not break my shell prompt.

How did you install bat?

homebrew


bat version and environment

I don't know the exact arguments zsh-async runs bat with.

Software version

bat 0.22.1

Operating system

macOS 12.6 (Darwin 21.6.0)

Command-line

bat --diagnostic

Environment variables

SHELL=/usr/local/bin/zsh
PAGER=/usr/local/bin/less
LESS=<not set>
LANG=<not set>
LC_ALL=en_US.UTF-8
BAT_PAGER=<not set>
BAT_CACHE_PATH=<not set>
BAT_CONFIG_PATH=<not set>
BAT_OPTS=<not set>
BAT_STYLE=<not set>
BAT_TABS=<not set>
BAT_THEME=<not set>
XDG_CONFIG_HOME=<not set>
XDG_CACHE_HOME=<not set>
COLORTERM=truecolor
NO_COLOR=<not set>
MANPAGER=<not set>

System Config file

Could not read contents of '/etc/bat/config': No such file or directory (os error 2).

Config file

Could not read contents of '/Users/pointlessone/.config/bat/config': No such file or directory (os error 2).

Custom assets metadata

Could not read contents of '/Users/pointlessone/.cache/bat/metadata.yaml': No such file or directory (os error 2).

Custom assets

'/Users/pointlessone/.cache/bat' not found

Compile time information

  • Profile: release
  • Target triple: x86_64-apple-darwin
  • Family: unix
  • OS: macos
  • Architecture: x86_64
  • Pointer width: 64
  • Endian: little
  • CPU features: fxsr,sse,sse2,sse3,ssse3
  • Host: x86_64-apple-darwin

Less version

> /usr/local/bin/less --version
less 608 (PCRE2 regular expressions)
Copyright (C) 1984-2022  Mark Nudelman

less comes with NO WARRANTY, to the extent permitted by law.
For information about the terms of redistribution,
see the file named README in the less distribution.
Home page: https://greenwoodsoftware.com/less
@pointlessone pointlessone added the bug Something isn't working label Oct 24, 2022
@sharkdp
Copy link
Owner

sharkdp commented Nov 2, 2022

Please see mafredri/zsh-async#44 and the referenced fix therein. Do you have a version of zsh-async with that fix? Or maybe this is broken again?

@sharkdp
Copy link
Owner

sharkdp commented Nov 2, 2022

Would still be interesting to know why bat as a cat replacement doesn't work in that scenario. Maybe someone could use strace to track down the exact cat/bat call and see which arguments are being passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants