Giter Site home page Giter Site logo

Revised symbols about gita HOT 22 OPEN

tinder-cfuller avatar tinder-cfuller commented on June 7, 2024
Revised symbols

from gita.

Comments (22)

nosarthur avatar nosarthur commented on June 7, 2024 2

please pip install again for a minor update for the alignment

actually the status (both the color and the edit status) is part of branch rn. I need to separate them later

from gita.

nosarthur avatar nosarthur commented on June 7, 2024 2

v0.16.6.4 has stash status implemented

from gita.

nosarthur avatar nosarthur commented on June 7, 2024 1

thanks @tinder-cfuller I didn't know about this spaceship prompt. They indeed put a lot of thought into this

I think it may be good to make gita more customizable, then everyone can have his/her favorite visualizations

from gita.

nosarthur avatar nosarthur commented on June 7, 2024 1

v0.16.4 is available via pip3 install -U gita

from gita.

nosarthur avatar nosarthur commented on June 7, 2024 1

It seems spaceship doesn't cover all the status gita covers now. For example, local is in sync with remote, local doesn't have remote

from gita.

nosarthur avatar nosarthur commented on June 7, 2024 1

please try 0.16.6

also, you would have to revert spaceship_status to branch

13:15 (clone-g) gita-wt3 $ cat ~/.config/gita/info.csv
branch,commit_msg,commit_time

If you want to customize the symbols, see https://github.com/nosarthur/gita#customize-information-displayed-by-the-gita-ll-command

from gita.

tinder-cfuller avatar tinder-cfuller commented on June 7, 2024

If you prefer not altering the current symbols, I am wondering if you could support two new info columns: branch_name and spaceship. Then the info.csv could be set to branch_name,spaceship,commit_msg,commit_time.

branch_name would obviously be the branch name only

from gita.

tinder-cfuller avatar tinder-cfuller commented on June 7, 2024

Relating to #223 the symbols could be customizable as well.

from gita.

tinder-cfuller avatar tinder-cfuller commented on June 7, 2024

v0.16.4 is available via pip3 install -U gita

@nosarthur Installed! 👍

A couple things I took note of:

  • The brackets should expand to the width of the one that has the most number of symbols
  • The symbols should be moved to a dedicated column so they are all vertically aligned

See the example I shared in my first message (above) that demonstrates this.

Thank you!! ❤️

from gita.

nosarthur avatar nosarthur commented on June 7, 2024

Full alignment would require us to get status for all repos first. It would cause the terminal to be frozen if there are hundreds of repos (I don't know why ppl do that ... but there are often requests related to such usage cases)

Maybe I can do fixed width with space fillings on the branch name, say 10 characters, it would resolve most cases unless one has very long branch names. What do you think?

from gita.

tinder-cfuller avatar tinder-cfuller commented on June 7, 2024

Full alignment would require us to get status for all repos first. It would cause the terminal to be frozen if there are hundreds of repos (I don't know why ppl do that ... but there are often requests related to such usage cases)

Oh, that makes sense. Thanks for the explanation. 👍

Maybe I can do fixed width with space fillings on the branch name, say 10 characters, it would resolve most cases unless one has very long branch names. What do you think?

Might it help to move the symbols to their own column separate from the branch? So at least the opening brackets may all be aligned. The result could be the following:

$ gita ll
blog     master   [!?]  minor changes (2 weeks ago)
dotfiles master   [!]   update mac colmak ah json (31 minutes ago)
gita     master         update CN readme and image (35 minutes ago)
repol    feature1       add readme (50 minutes ago)
worklog  refactor       Update onboard-desmond.m (7 months ago)

☝️ Then the info columns would be branch,status,commit_msg,commit_time

from gita.

tinder-cfuller avatar tinder-cfuller commented on June 7, 2024

Sounds great. Thank you! 👍

from gita.

yellowtailfan avatar yellowtailfan commented on June 7, 2024

These changes are looking great so far. Are you planning to add all of the symbols in #245 (comment)?

E.g. I notice that when a repo is behind main, the colour changes but there are no symbols in the brackets [].

from gita.

nosarthur avatar nosarthur commented on June 7, 2024

yeah, that's the plan; I need to do some refactoring first

from gita.

nosarthur avatar nosarthur commented on June 7, 2024

please try 0.16.5

after pip install, replace branch by spaceship_status for the gita info setting

23:58 (grid-force *) 4th-wt $ cat ~/.config/gita/info.csv
spaceship_status,commit_msg,commit_time

from gita.

yellowtailfan avatar yellowtailfan commented on June 7, 2024

Nice thanks! Although it would be even nicer to have both the colours and the spaceship symbols. 🚀

from gita.

nosarthur avatar nosarthur commented on June 7, 2024

I can surely add that

from gita.

yellowtailfan avatar yellowtailfan commented on June 7, 2024

Beautiful thankyou! 👏

from gita.

tinder-cfuller avatar tinder-cfuller commented on June 7, 2024

@nosarthur Thank you for making these changes! ❤️ This is great!

There are a couple additional items I would kindly suggest:

  • Include $ symbol when there are stashed changes
  • Change the output order of the symbols to in_sync,no_remote,local_ahead,remote_ahead,diverged,stashed,dirty,staged,untracked or allow order customization
  • Omit the brackets when no symbols are present, meaning never output an empty []

May you please re-open this issue? Or would you prefer I create new separate issues?

from gita.

yellowtailfan avatar yellowtailfan commented on June 7, 2024

I just noticed that gita ll --help prints a handy list of status and colour meanings. However, it's a little out of date for untracked (it has changed to ? I think?) and stash $ is missing:

$ gita ll --help
usage: gita ll [-h] [-C] [-g] [{all}]

  status symbols:
    +: staged changes
    *: unstaged changes
    _: untracked files/folders

  branch colors:
    white: local has no remote
    green: local is the same as remote
    red: local has diverged from remote
    purple: local is ahead of remote (good for push)
    yellow: local is behind remote (good for merge)

from gita.

nosarthur avatar nosarthur commented on June 7, 2024

thanks @yellowtailfan I have updated the help message in v0.16.6.5

from gita.

yellowtailfan avatar yellowtailfan commented on June 7, 2024

Much better now, thanks @nosarthur!

from gita.

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.