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

imgcat implementation does not work with images with spaces in the name #2970

Open
MrGamerDoesGames opened this issue May 1, 2024 · 1 comment

Comments

@MrGamerDoesGames
Copy link

Runtime Environment

  • Operating system and version: Arch Linux
  • Terminal emulator and version: WezTerm 20240405-180910-cce0706b
  • Python version: 3.11.8
  • Ranger version/commit: 1.9.3
  • Locale: EN-US

Current Behavior

If an image has a space in the name, the wezterm imgcat command will fail.

Expected Behavior

The image will preview no matter the filename.

Context

Possible Solutions

Put the filename in quotations or apostrophes, so that it is read as a string. I am unsure on how to correctly do this, which is why I'm writing this.

Steps to reproduce

  1. Change the image preview method to wezterm imgcat
  2. Put the imgcat code in your command.py file
  3. Open ranger
  4. Attempt to preview an image with a space in the file name

Traceback

No crash.
@MrGamerDoesGames
Copy link
Author

Just learned that the iterm2 image preview works in wezterm, with spaces. Which just confuses me even more:

  1. If we have a working imgcat implementation with iterm2, why do we need another one?
  2. Why are we putting the name as iterm2 when it works on other terminals?
  3. Why is the user not told that this implementation also works with wezterm?
  4. And why are the image previews on iterm2 so small by default?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant