Giter Site home page Giter Site logo

Comments (12)

hallzy avatar hallzy commented on July 21, 2024

The image you provided doesn't seem to be working for me so I can't really see your issue.

Apart from that I would say that if you have a .gitradarrc file, show the contents of that, and if you have anything else in your prompt (PS1 variable) elsewhere in your bashrc, that would be useful probably too (or any other custom settings for git-radar)

Also, has this worked in the past, or is this the first time you have started using gitradar? And any steps to reproduce would be good too (unless it seems to happen no matter what, or seemingly random times)

from git-radar.

valorin avatar valorin commented on July 21, 2024

No .gitradarrc, the only other line in .bashrrc is:

    PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '

I've been using gitradar for months/years (and loving it), but it's only recently started doing this. I'm pretty sure it started doing it randomly one day - so then I updated to latest, with no change in the behaviour.

This shows the problem, note the lack of space after >> on the first line:

valorin@aragorn:/tmp/r1⟫ (upstream ⚡ master) >>git status
valorin@aragorn:/tmp/r2⟫ (master) >> git status

I was doing more debugging and it appears to only be occurring when I use gitradar within http://byobu.co/, which is basically a fancy UI on top of tmux. After jumping out of that, it works fine. But it used to work fine in byobu...

from git-radar.

hallzy avatar hallzy commented on July 21, 2024

Interesting... I cloned byobu and I don't see the same thing as you... it is the same for me regardless of what repo I am in, or if it is untracked or tracked, both with my prompt and the one you provided... that is, there is no space at all after the branch name (though that can be fixed by adding a space at the end of the git-radar call in the PS1)

btw, are the >> characters part of your prompt as well, or is that a place holder to just emphasize the missing space? I just ask, because the PS1 variable given above doesn't seem to have that when I tried using your prompt.

This is exactly what I get (note that I believe I have a separate setting that formats the cwd in this way):

steven@vaio-mate:~/.../git-repos/remote-github/byobu$  git:(upstream ⚡ new)git status
steven@vaio-mate:~/.../git-repos/remote-github/byobu$  git:(master)git status

If I change the prompt a little I get this:

steven@vaio-mate:~/.../git-repos/remote-github/byobu git:(master) $ git status
steven@vaio-mate:~/.../git-repos/remote-github/byobu git:(upstream ⚡ new) $ git status
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]'
export PS1="$PS1\$(git-radar --bash --fetch) $ "

But I sense that this isn't your issue

from git-radar.

hallzy avatar hallzy commented on July 21, 2024

I just realized that you meant actually using byobu, not working within its code, so the above message really is of no use. I will see if I can try byobu

from git-radar.

valorin avatar valorin commented on July 21, 2024

Oooh, good point about >>, you've just reminded me that I did customise it ages ago... I just did some digging and found I'd modified the radar-base.sh file to add in the >>, etc. Reverting it back to the original version doesn't actually help though...

The cursor is still in the wrong spot, and now it's overwriting the ( character...

valorin@aragorn:/tmp/r1⟫  git:(upstream ⚡ mastergit status
valorin@aragorn:/tmp/r2⟫  git:(master)git status

Also the stash character appears to be extra-wide so it's going into half of the next character... and github file uploads are broken...

from git-radar.

hallzy avatar hallzy commented on July 21, 2024

changing your PS1 as below:

export PS1="$PS1\$(git-radar --bash --fetch) >> "

I would think that that would accomplish what you had done to get the >> into your prompt, but without modifying the git-radar code. Again, this is unlikely to solve your problem though.

To get into byobu do you just run the command byobu? When I do that I still don't see the same issue as you. Spacing still seems fine to me.

from git-radar.

valorin avatar valorin commented on July 21, 2024

Yep, you just run byobu to launch it. I do have the Ubuntu PPA version, not latest from code.. I might try downloading that, in case it's an issue they've fixed.

I modified radar-base.sh because adding >> into the PS1 line would've appended it onto every console prompt, but I only want it as a spacer when the git-radar output is displayed.

from git-radar.

hallzy avatar hallzy commented on July 21, 2024

Ah, that makes sense. That could be a configuration feature to add to git-radar actually... just to make it easier.

I installed it with the Ubuntu PPA as well:

$ byobu -v
byobu version 5.106
tmux 2.1

from git-radar.

valorin avatar valorin commented on July 21, 2024

Yeah, that'd be a cool config option - I'd definitely use it. :-)

> byobu -v
byobu version 5.115
tmux 2.2

Well scrap that theory then... If you can't replicate it, then I'm not sure what's left to do apart from wait for someone else to experience it, or stumble upon the cause.

from git-radar.

hallzy avatar hallzy commented on July 21, 2024

ya I don't know. I tried upgrading to tmux 2.2 as well, but still couldn't replicate. I will have a look at the code and see if anything stands out, and I'll continue to use byobu for a bit and see if I come across anything.

Unless you made another change to git-radar that you forgot about, or there is some other configuration that was forgotten. Either way, I will keep an eye out for anything.

Maybe I will push a pull request for that configuration as well. Seems like a good idea.

The owner of this repo seems to have been inactive for a bit though, so I am not sure when such a change would even make it into the repo.

from git-radar.

hallzy avatar hallzy commented on July 21, 2024

@valorin just wanted to let you know that I pushed a pr #110 that adds a two variables to allow both a prefix, and a suffix to git-radar. Again, I don't know when, or even if it will get accepted, so if you want to use it I guess just copy the changes over somehow if you want to use it. I specified the .gitradarrc file, but I believe all those variables also work defined inside of the bashrc as well.

from git-radar.

valorin avatar valorin commented on July 21, 2024

Thanks @hallzy! :-)

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.