geometry-zsh / geometry

geometry is a minimal, fully customizable and composable zsh prompt theme
ISC License
931 stars 94 forks source link

mnml with infoline #238

Closed jedahan closed 5 years ago

jedahan commented 5 years ago

I did another rebase, now with a GEOMETRY_INFO array which will run on an empty command, and has no known issues - I think it is stable enough for a beta.

This supersedes #233

jedahan commented 5 years ago

Regarding #226, I'd like to see that as a later PR, perhaps v2.1. I need to re-read it to understand what #226 does that cannot already be achieved by this PR.

frm commented 5 years ago

The main thing would be changing the order of what's inside a plugin. A good example would be the git plugin which is rather complex.

jedahan commented 5 years ago

The main thing would be changing the order of what's inside a plugin. A good example would be the git plugin which is rather complex.

Yeah I think it would be nice to revisit the git plugin in a future pr. I'll start a tracking issue now.

jedahan commented 5 years ago

@justmendes I made it so you can change the order of the git plugin simply by calling the helper functions directly. Its not perfect but seems good.

jedahan commented 5 years ago

Just a heads up, this would close #228 #226 #225 #224 #239 #220 #207 (though this might be closed regardless)

frm commented 5 years ago

Sorry, been relocating for the past month. Let's close this, it's a large refactor and we should work on it off master for bug fixing.

jedahan commented 5 years ago

Congrats on the move!

I think because its a big change, I would add a few more todos before merging:

Anything else?

frm commented 5 years ago

record screencast showing function-based approach

This is the function override feature, right?

add a deprecated.zsh plugin that warns the user if they are using any of the old variable names that the prompt has changed and how to fix it (or automatically guessing)

I like this, we should probably do an upgrading guide and point them there.

MarioRicalde commented 5 years ago

Hello. I was looking to install geometry prompt today. I was wondering if this is the branch I should be working with since you guys seem like you're going to make a release soon?

Let me know if I can help with anything.

MarioRicalde commented 5 years ago

When attempting to use your branch with zplug I get the following warning.

WARNING:  Failed to load "~/.zplug/repos/jedahan/geometry/geometry.zsh-theme" (jedahan/geometry)

The code in .zshrc is:

zplug "jedahan/geometry", at:mnml, as:theme
jedahan commented 5 years ago

@MarioRicalde can you open a new issue that its not working with zplug?

MarioRicalde commented 5 years ago

@jedahan the one in master of this repo is working without warnings. Should I open an issue over here or your repo

Also, I did some research and found this:

https://github.com/zplug/zplug/issues/424#issuecomment-320523980

The prompt seems to work, you just get that warning.

For the time being what I did was clone the repo and source it manually.

MarioRicalde commented 5 years ago

Also, I'm not sure if this is an issue.

image

jedahan commented 5 years ago

yes please open new issues on my repo, thanks for all the reporting!

frm commented 5 years ago

On the previous topic:

record screencast showing function-based approach

do you need help with this? I have recording tools if needed.

add a deprecated.zsh plugin that warns the user if they are using any of the old variable names that the prompt has changed and how to fix it (or automatically guessing)

I can write a script that warns for any defined & deprecated variables if you want

write a release announcement for r/zsh r/commandline r/unixporn etc...

can also do this, if needed. Let me know what I can help in

MarioRicalde commented 5 years ago

@jedahan you don't have issues enabled on your repo 🌵

@justmendes let me know if there's anything I can do to help too, I'm down to help with this.

MarioRicalde commented 5 years ago

Since the repo still has issues closed, and I'm finding more stuff, I'll drop it here for now:

the "no commits" functionality on the git function doesn't seem to be working as intended out of the box.

image

After reading the code I found about that variable that once set it suddenly works, although it has some issues with formatting, no::commits instead of no commits.

MarioRicalde commented 5 years ago

Sweet, I saw you added issues and I saw you just fixed the issue I just reported ;)

jedahan commented 5 years ago

@justmendes The thing that would be most helpful is drafting an announcement. I don't know why I avoid writing it but I do 🤷‍♂️

@justmendes or @MarioRicalde A geometry_deprecated() function that would look for set variables and 1. warn users of the new names, 2. pointed to the new readme or a migration guide on a wiki would be also very helpful

I can make a short svg of the function approach

MarioRicalde commented 5 years ago

@jedahan @justmendes I can help provide proofreading or fluffing of content if you give me some points you want to touch, I love writing.

I can also help with graphics since I do UI/UX stuff at my day job.

I'm new to the project, but I'll contribute with whatever is possible, just point me in the direction of what you want to be done and some guidance and I'll work on it. For the time being, I'm going to review your stuff @jedahan and blast you with issues.

frm commented 5 years ago

@jedahan I can write and also do some custom themes, like the one I'm using now, based on an older revision of this branch.

@MarioRicalde do you want to start by doing that deprecated function? I think you might benefit of doing that as it requires you to have an overview of the codebase. It would be a good entry point into the project.

Since you mentioned graphics, we had #164 open for a while. Would you be interested in reopening this? It would be something simple and minimal, as these are the ideas of the theme.

MarioRicalde commented 5 years ago

@justmendes I'm going to be working on #164 this week, some proposals to get the ball rolling and if someone appears that makes something better, that works too.

I'm not sure if I'm the best person for that task, considering I'm really not top notch about everything that was implemented. I'm currently working on documenting the options, or a draft at the very least. @jedahan do you want to take on the migration function so we can release 2.0?

frm commented 5 years ago

I can tackle the deprecated function, no worries 👍

frm commented 5 years ago

@jedahan do you think #226 is still worth it?

Personally I like it since it makes customization that much easier and flexible. It also allows us to reduce the number of variables and make the codebase more maintainable.

I do think if we decide to do something like that, we should first merge this and built #226 on top of it.

jedahan commented 5 years ago

@justmendes After merging in these changes, I think building a new version of #226 makes sense only for the git plugin. Even then, I can make examples of how to customize the git plugin simply by listing GEOMETRY_RPROMPT=(geometry_git_conflicts geometry_git_symbol) as an example of re-ordering without needing to change the render vars.

All other functions are so small that I feel that any customization beyond color/symbol/time variables, which we have exported, can easily be built from scratch by the user. Maybe I am not being creative enough.

MarioRicalde commented 5 years ago

I agree with @jedahan - after reading the proposed structure, I can't say I'm a fan of the functional approach. I like the simplicity that the new branch offers and how clean it looks compared to the functional approach, even if it's less customizable.

jedahan commented 5 years ago

@MarioRicalde thats fair - let me see if theres a way to give some space, either by re-adding the breaks, or changing the header sizes or removing the geometry_blah.zsh being in code-formatting.

MarioRicalde commented 5 years ago

What else are we pending for the release of this branch?

Cheers.

jedahan commented 5 years ago

@MarioRicalde

MarioRicalde commented 5 years ago

I can help with #1 and #3

For #1 in your list, I think that we can keep most things as is in your branch, the only comment I have is the separators ( :: ) not having spaces before and after. Other than that it looks good.

For #3 what's the message that we want to convey? I can write a quick draft and we can go from there.

jedahan commented 5 years ago

@MarioRicalde I updated #247 with my thoughts, and added the spaces around ' :: ' in the git separator

jedahan commented 5 years ago

I would like to merge this branch by Wednesday, April 17th, and wait 1 week until tagging the new version. I am okay with us not having announcements ready. What do you think @desyncr @MarioRicalde @justmendes

frm commented 5 years ago

Pinging here, based on the new updates. Have you checked this comment @jedahan ?

jedahan commented 5 years ago

default branch is now mnml, thanks for everyone's help and patience