Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add minpac#status() function for showing status of plugins. #56 #58

Merged
merged 5 commits into from
Sep 1, 2018

Conversation

kristijanhusak
Copy link
Contributor

Initial version of status list.
Shows only installed/updated plugins after minpac#update() is called.
Otherwise, returns status of all plugins.
It works similar to vim-plug, but lot of feature are missing (commit preview, handling each commit separately, etc.)
This satisfies my requirement for now, and it can be extended later on.

@kristijanhusak
Copy link
Contributor Author

I'm not sure why appveyor is failing.

@k-takata
Copy link
Owner

I'm not sure why appveyor is failing.

The appveyor environment didn't support Vim 8.1.
I have fixed it.

@kristijanhusak
Copy link
Contributor Author

Ok, should i rebase to make this pass?

if !isdirectory(l:dir)
let l:plugin.status = 'Not installed'
else
let l:commits = systemlist([g:minpac#opt.git, '-C', l:dir, 'log',
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't want to use systemlist() (or system()), because it opens a command window on Windows.
Can you use s:system() instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just tried, but that won't return any results. I tried increasing sleep to 1000m in s:system, but still i get empty results back. Do you have idea why?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My bad. It works. Pushed a fix.

@k-takata
Copy link
Owner

Can I see a screen shot of this?

@kristijanhusak
Copy link
Contributor Author

Sure.
Status after the minpac#update()
update

Calling status without minpac#update() ran before:
status

@pierremoreau
Copy link

Thank you for your work @kristijanhusak: this is something I was missing coming from vim-plug. 😃

You might want to add --no-show-signature to the list of options given to git log, as otherwise on systems where --show-signature is turned on by default, you end up with the following:
currentstatus

To display some of that signature information in a way that fits one-line outputs, you could use the %G? flag given to --pretty-format. I am not sure if many are interested by that information, so maybe it should be behind an option that defaults to off or whatever is the value returned by git config log.showSignature. I do not feel strongly about adding the %G? flag, so feel free to disregard it if you think it is useless. Here is how it could look like, when placed between the commit hash and the subject:
statuswithgpginfopng

@kristijanhusak
Copy link
Contributor Author

@pierremoreau thanks for the feedback! I guess i'll just remove the signature, it's not really important. I also plan to add a preview of commit by clicking on it in the list.

@kristijanhusak
Copy link
Contributor Author

@k-takata I moved some code around, hope it's fine by you.
I also added commit preview in the similar way vim-plug does it. It wasn't planned initially, but it's nice to have it.

@pierremoreau
Copy link

Sorry for the delay, but thank you for adding the --no-show-signature flag, and adding the commit preview: it works very well!

@kristijanhusak
Copy link
Contributor Author

Great @pierremoreau, thanks for testing. @k-takata , is there something more to be done here?

k-takata added a commit that referenced this pull request Aug 22, 2018
@k-takata
Copy link
Owner

I have merged this into the devel branch (with some modifications).

@kristijanhusak
Copy link
Contributor Author

Great, thanks!

@k-takata k-takata merged commit c45748b into k-takata:master Sep 1, 2018
@k-takata
Copy link
Owner

k-takata commented Sep 1, 2018

I have released v2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants