Giter Site home page Giter Site logo

Bugs in new version about git-radar HOT 18 OPEN

michaeldfallen avatar michaeldfallen commented on July 20, 2024
Bugs in new version

from git-radar.

Comments (18)

michaeldfallen avatar michaeldfallen commented on July 20, 2024

how unusual.. can you post your GIT_RADAR_FORMAT (since I'm guessing you've used that feature to customise the radar) and your fish equivalent of PROMPT or PS1 (I don't really know fish at all).

from git-radar.

n10v avatar n10v commented on July 20, 2024

GIT_RADAR_FORMAT = " (%{remote: }%{branch}%{ :local})%{ :changes}"
PROMPT = git-radar --fish

from git-radar.

michaeldfallen avatar michaeldfallen commented on July 20, 2024

Probably you have a colour code applied to the folder part, the ~/nehm which isn't being closed and so the colour is continuing until the next $reset_color or \x01\033[0m\x02. I'd try adding \x01\033[0m\x02in front of your call to git-radar, that might fix it.

from git-radar.

lucas-clemente avatar lucas-clemente commented on July 20, 2024

I've got the same problem since the last update (from homebrew):

I didn't change anything. My PS1 is

%{
%}$(build_prompt)%{%}

I don't know why there's a newline there, but it apparrently doesn't matter.

from git-radar.

michaeldfallen avatar michaeldfallen commented on July 20, 2024

@lucas-clemente what does your PROMPT look like? PS1 is used in Bash, not Zsh so I wouldn't expect it to work for you.

Also, what does that build_prompt function look like? Like the one in your dotfiles?

from git-radar.

lucas-clemente avatar lucas-clemente commented on July 20, 2024

$PROMPT is the same as $PS1 (maybe oh-my-zsh does that?). I didn't update my dotfiles in a while, but pushed the current version using git-radar now.

Also, while I'm in a git folder, git-radar returns the following:

~/D/test git:(upstream ⚡ master)
 → /usr/local/bin/git-radar --zsh
 %{%}git:(%{%}upstream %{%}⚡%{%} %{%}master%{%}%{%})%{%}
~/D/test git:(upstream ⚡ master)
 →

Dunno if the newline should be there or not? Thanks for your help! 👍

from git-radar.

n10v avatar n10v commented on July 20, 2024

Use 1.3.2 version and I like it
No problems with it

from git-radar.

pkernevez avatar pkernevez commented on July 20, 2024

I've exactly the same problem with the last version on MacOSx ElCapitan + fish.
All is good with bash, but I've the additional carriage return.
I have the problem with all default values and also with
set -gx GIT_RADAR_FORMAT = " (%{remote: }%{branch}%{ :local})%{ :changes}"
set -gx PROMPT = git-radar --fish

image

from git-radar.

n10v avatar n10v commented on July 20, 2024

@pkernevez I have the same configuration
Honestly, I love previous version of git-radar. It suits me.
So I made a lightweight fork of it and it works great for me
If you interested in it, you can check it here: https://github.com/bogem/git-radar

from git-radar.

michaeldfallen avatar michaeldfallen commented on July 20, 2024

@pkernevez that's really weird. I'm sorry it's not working well in fish. I'll install fish on a VM and test it out tomorrow (it's 11pm in London right now) and see what I can find out.

Do you have any weird versions of printf or sed? I use them extensively for string manipulation and they can cause issues if not the standard.

Can you run printf '%q' "$(git-radar --bash)"and paste in the output here? It should show us what characters git-radar is outputting.

My output is (on master and clean, no commits or changes): \ $'\001'$'\033'\[1\;30m$'\002'git:\($'\001'$'\033'\[0m$'\002'$'\001'$'\033'\[0m$'\002'master$'\001'$'\033'\[0m$'\002'$'\001'$'\033'\[1\;30m$'\002'\)$'\001'$'\033'\[0m$'\002'

If they match mine then it's not an environment problem. We'll then have to look at configuration and see what is different between yours and mine.

If they don't then it is an environment problem and I'll need to handle another slightly different version of a tool like sed or printf.

from git-radar.

michaeldfallen avatar michaeldfallen commented on July 20, 2024

@pkernevez another comment as that was getting long:

My current guess is still that there's something screwy happening with the nonprinting characters and colour codes. It's based on the first characters being green.

The other option is there's a rogue printf or echo adding a newline where on my environment it doesn't do that.

Fingers crossed we can sort this out for you, sorry it hasn't been a painless install.

from git-radar.

pkernevez avatar pkernevez commented on July 20, 2024

Hi Michael,

Form a bash shell in a clean master folder:

git st
On branch master
nothing to commit, working directory clean

printf '%q' "$(git-radar --bash)"
$' \001\E[1;30m\002git:(\001\E[0m\002upstream \001\E[1;31m\002?\232?\001\E[0m\002 \001\E[0m\002master\001\E[0m\002\001\E[1;30m\002)\001\E[0m\002'

There is differences with your, but I can't interpret these ones.

With bash the output is the same with --fish:

printf '%q' "$(git-radar --fish)"
$' \001\E[1;30m\002git:(\001\E[0m\002upstream \001\E[1;31m\002?\232?\001\E[0m\002 \001\E[0m\002master\001\E[0m\002\001\E[1;30m\002)\001\E[0m\002'

from git-radar.

michaeldfallen avatar michaeldfallen commented on July 20, 2024

ok, I've set up a Centos 7 VM with a clean fish and zsh install. Using the config laid out in the readme I get exactly what I would expect out. No extra new lines at the end.

@BoGeM @lucas-clemente @pkernevez can you post your configs here and I will try to replicate the issues in the vm. If I can't by your config replicate it then it has to be environment, either versions of echo, printf and sed not acting as expected.

My Centos VM uses only GNU coreutils 8.22 versions of echo, printf and GNU sed version 4.2.2.

from git-radar.

n10v avatar n10v commented on July 20, 2024

I have default config

from git-radar.

pkernevez avatar pkernevez commented on July 20, 2024

I have a default installation too, but on MacOSX, not on CentOS.

On Thu, Nov 5, 2015 at 2:47 PM, Michael Allen [email protected]
wrote:

ok, I've set up a Centos 7 VM with a clean fish and zsh install. Using the
config laid out in the readme I get exactly what I would expect out. No
extra new lines at the end.

@BoGeM https://github.com/bogem @lucas-clemente
https://github.com/lucas-clemente @pkernevez
https://github.com/pkernevez can you post your configs here and I will
try to replicate the issues in the vm. If I can't by your config replicate
it then it has to be environment, either versions of echo, printf and sed
not acting as expected.

My Centos VM uses only GNU coreutils 8.22 versions of echo, printf and
GNU sed version 4.2.2.


Reply to this email directly or view it on GitHub
#73 (comment)
.

Philippe Kernévez

Directeur technique (Suisse),
[email protected]
+41 79 888 33 32

Retrouvez OCTO sur OCTO Talk : http://blog.octo.com
OCTO Technology http://www.octo.com

from git-radar.

n10v avatar n10v commented on July 20, 2024

I have too Mac OS X El Capitan

from git-radar.

michaeldfallen avatar michaeldfallen commented on July 20, 2024

Sorry, I meant you're ~/.[zsh|fish|bash]rc configs

from git-radar.

pkernevez avatar pkernevez commented on July 20, 2024

Hi all,

I found the bug and created a pull request.
Juste replace :
git-radar --fish --fetch

by :
echo -n (git-radar --fish --fetch)

This remove the trailing '\n'

Regards,
Philippe

On Fri, Nov 6, 2015 at 4:10 PM, Michael Allen [email protected]
wrote:

Sorry, I meant you're ~/.[zsh|fish|bash]rc configs


Reply to this email directly or view it on GitHub
#73 (comment)
.

Philippe Kernévez

Directeur technique (Suisse),
[email protected]
+41 79 888 33 32

Retrouvez OCTO sur OCTO Talk : http://blog.octo.com
OCTO Technology http://www.octo.com

from git-radar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.