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

Plugin Names with comma in their name are impossible to specify #6

Closed
lucius-martius opened this issue Mar 30, 2024 · 4 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@lucius-martius
Copy link

lucius-martius commented Mar 30, 2024

Maybe I'm overlooking something, but there seems to be no way to specify plugin names like "Umbra, Blademaster.esp" to an '-m' merge command without habasi failing because it thinks I just specified two non-existant plugins.

I can just rename the plugin and its fine, but these days plugin names carry a certain relevancy since they are used to sort load order with plox/mlox.

My suggestion would be to support an escape sequence \,.

@alvazir
Copy link
Owner

alvazir commented Mar 31, 2024

Hello!

I've checked and confirm the bug. It's partial though, because "alternative" ways to provide such names exist. That's why I've never encountered it, despite using plugins with commas in names :-\

  1. Not working:
    ./habasi -m "out.esp, Umbra, Blademaster.ESP, Vampire Hunters, but They Want to Reintroduce You to Death.esp"
  2. Working(only possible for 1 last --merge list though):
    ./habasi -m "out.esp" "Umbra, Blademaster.ESP" "Vampire Hunters, but They Want to Reintroduce You to Death.esp"
  3. Working(via config file):
    merge = [[ "out.esp", "Umbra, Blademaster.ESP", "Vampire Hunters, but They Want to Reintroduce You to Death.esp" ]]

Yes, I should fix the first case. Escape sequence looks great.

@alvazir alvazir self-assigned this Mar 31, 2024
@alvazir alvazir added the bug Something isn't working label Mar 31, 2024
@alvazir
Copy link
Owner

alvazir commented Mar 31, 2024

Found another funny workaround for now. Use glob or regex pattern :-D Next example simply replaces comma with a dot(which represenets any symbol in regex).

./habasi -m "out.esp, regex:Umbra. Blademaster.ESP, regex:Vampire Hunters. but They Want to Reintroduce You to Death.esp"

@lucius-martius
Copy link
Author

I personally am entirely satisfied by specifying the files as individual arguments (workaround 2), it even simplifies my script, since I don't need to concat the file names anymore and don't need multiple merge lists. I could have figured this out myself, but it seems I completely missed it in my multiple times of going over the help-output of the -m command.

As to multiple merge-lists I feel like the regex workaround is a bit awkward, though I can't think of a situation where it would not work. Is there any reason we can't have multiple -m commands with each multiple arguments or is it just because that complicates command-line parsing?

I'll leave it to you if you want to close the issue or keep it open.

@alvazir
Copy link
Owner

alvazir commented Apr 2, 2024

  1. Help output may definitely be improved. That'd be great if you have an idea of how to reword it or where to move the part about the needed thing :-)

  2. Yep, that complicates things and most possibly requires changing command line parsing library. The "last --merge with multiple arguments" was not planned at all actually and appeared in a recent release as an afterthought.

  3. The issue will stay for a while until it's solved. Thank you for reporting it.

alvazir added a commit that referenced this issue May 28, 2024
Fixes:

Allow specifying plugin names with comma in their name by escaping(prepending with backspace) in --merge option thanks to Lucius Martius' report(resolve [Issue-6](#6)).
@alvazir alvazir closed this as completed May 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants