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

Allow setting plugin name #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jfhbrook
Copy link

Very nice little ansible role!

I added a small feature - allowing to set the name of the plugin instead of using the basename of the git repo. This is handy if the plugin's repo is named something silly like "vim" - for example, the dracula plugin.

I'm not quite an expert at ansible, so there might be a better way to do this. Happy to iterate with feedback!

@ctorgalson
Copy link
Owner

This is an excellent idea.

I think a marginally better way would be to remove the new fact and its accompanying check and change this original line from:

    vim_plugin_name: "{{ (vim_plugin_install.repo | basename | splitext)[0] }}"

...to:

    vim_plugin_name: "{{ vim_plugin_install.name | default((vim_plugin_install.repo | basename | splitext)[0]) }}"

@jfhbrook
Copy link
Author

Again, sorry that I missed the notification on this.

Yeah, that seems reasonable to me. I'm unfortunately strapped for time and don't think I'll find the space to submit this fix. But I agree that this sounds better.

@jfhbrook
Copy link
Author

I was able to find the time to give this an update. I tried your suggestion and it worked on my machine! Let me know what you think, I'll try to be more responsive to notifications.

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.

2 participants