qoomon / zjump

Simplify zsh directory navigation; jump to already visited, parent or sub folders.
MIT License
12 stars 4 forks source link

Bug: colorized output is breaking on some shell clients (ie. Wezterm) #3

Closed leonardomerlin closed 1 year ago

leonardomerlin commented 1 year ago

Hi, first of all, thanks for this amazing plugin. I've been using it for a while. Previously I was using with hyperjs. Recently I started to try WezTerm, but the colorized option is failing on it.

Here is an example of the output:

➜  ~ j exp
zjump:cd:74: no such file or directory: ^[[1m^[[36m/Users/leonardomerlin/projects/experiments^[[39;49m^[[0m

If I manually edit the script and remove the --color=always flag, it works fine.

Do you think that would be possible to make the colors optional? Something that we can disable via some env variable... (I'm not sure if this is already possible, btw. I'm still learning about it)

qoomon commented 1 year ago

could you try to add --ansi to fzf command?

qoomon commented 1 year ago

I can't reproduce this error on my machine (MacOS Ventura, WezTerm Version 20230408-112425-69ae8472)

qoomon commented 1 year ago

@leonardomerlin please reopen if issue still occurs.

QuantumBJump commented 9 months ago

Hi! I use gnome terminal and was encountering this same problem. adding --ansi to the fzf command did indeed fix the problem!

edit: op's workaround, to remove --color=always, also fixed the jump behaviour, but adding --ansi also preserves colorisation

qoomon commented 9 months ago

I'll fix it

qoomon commented 9 months ago

I added the --ansi to fzf command. feel free to test

QuantumBJump commented 9 months ago

Yep! pulling from master the problem seems to be fixed on my end