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

sesh list -i | fzf dont show color correctly #108

Open
2 tasks done
marcellmartini opened this issue May 15, 2024 · 11 comments
Open
2 tasks done

sesh list -i | fzf dont show color correctly #108

marcellmartini opened this issue May 15, 2024 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@marcellmartini
Copy link

marcellmartini commented May 15, 2024

What happened?

I'm using Ubuntu 22.04 update to the last version. When I ran the command sesh list -i | fzf, I expected the color and the icons to work correctly but the colors weren't interpreted correctly and the selection shows as in the image below!

image

To fix the problem, use the --ansi. Like sesh list -i | fzf --ansi.. The characters are interpreted correctly with the --ansi option.

image

I opened this bug because I didn't find this information in the documentation. it happens in fzf-tmux too and the fix is the same.

Version

  • ubuntu 22.04.4 LTS
  • sesh version 1.1.0
  • tmux 3.2a
  • fzf 0.52.1
  • alacritty 0.13.2 (bb8ea18e)

Relevant log output

No response

Reviewed

  • Reviewed existing issues and made sure this bug has not already been submitted.
  • I have read the documentation and understand how sesh works before submitting this bug
@marcellmartini marcellmartini added the bug Something isn't working label May 15, 2024
@joshmedeski
Copy link
Owner

Thanks for the feedback. I'm in the middle of rewriting sesh to be even more performant and squash some bugs.

I will get to this but not right now, I suggest keeping the --ansi flag for now and I'll make this feature more robust during the rewrite.

@marcellmartini
Copy link
Author

marcellmartini commented May 15, 2024

OK, no problem, thanks for the response. This issue will help as a temporary document for people with the same problem till it is fixed in future releases.

I added the versions of all the environments I'm using.

@marcellmartini
Copy link
Author

Congratulations.. sesh is a great tool. It's helping me a lot. Keep up the great job you are doing. if you need some help with v2 I'll be happy to help in my free time.

@PookieBuns
Copy link

PookieBuns commented May 16, 2024

Hi! I was also facing issues with the whole tmux integration especially with Nerd Font Icon support and took a while to figure out how to tweak it all to get it working. I looked through the issue tracker and found a lot of people had similar needs and ran into similar issues as I have so I decided to write a script that would bridge the gap and simplify integrating fzf with sesh. I'm not sure if this is the correct place to post / plug this (please let me know if this isn't) but I think this could simplify the integration for many people! Once again love this tool thanks!

https://github.com/PookieBuns/fzf-sesh

@joshmedeski
Copy link
Owner

joshmedeski commented May 16, 2024

I wonder if the shell level had anything to do with getting the colors to render correctly 🤔

@joshmedeski
Copy link
Owner

Would you guys be interested in me adding an option to disable colors in the meantime? Otherwise you could keep the ansii flag or drop icons in your tooling.

@PookieBuns
Copy link

PookieBuns commented May 16, 2024

So I did a bit of digging and found out that this isn't even a sesh problem it's just fzf by default doesn't support ansi for performance reasons link

You can easily reproduce this by just running

echo '\033[0;36m' | fzf

with or without the ansi flag.

IMO I don't think it's that big of a deal, especially since it's not even a "bug" per se, just some incompatibility with default configurations. Probably some documentation mentioning that by default fzf doesn't support ansi color codes will suffice. Also, who doesn't like pretty colors :)

Also since sesh isn't natively integrating with fzf out of the box, I would assume this is out of scope for sesh.

@joshmedeski
Copy link
Owner

Thanks for the research. I don't mind upgrading how colors are handled in sesh, but these are great details to point out.

I use the --ansi flag by default because I wanted to match my terminal colors with all my fzf workflows. Maybe others want to follow a similar pattern to make it easier.

@joshmedeski
Copy link
Owner

Can you upgrade to sesh v2 and tell me if you still have this problem?

@marcellmartini
Copy link
Author

marcellmartini commented Aug 29, 2024

Hi @joshmedeski, I still have the same problem after the upgrade to v2. I still need the --ansi in the tmux configuration.

with gum work correctly, but with fzf-tmux need the --ansi

@joshmedeski
Copy link
Owner

That makes sense, I'm using ansi colors to generate the colors 😬

Do you want the ability to overwrite the colors with your own values? I think trying to overwrite colors without some sort of configuration would be complicated.

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
Status: Next
Development

No branches or pull requests

3 participants