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

Interest in adding a command --help syntax? #2130

Closed
victor-gp opened this issue Mar 29, 2022 · 5 comments
Closed

Interest in adding a command --help syntax? #2130

victor-gp opened this issue Mar 29, 2022 · 5 comments

Comments

@victor-gp
Copy link
Contributor

Syntax:

As mentioned in #2115, I'm making a syntax to scope command help messages. You can find some examples here.

Guideline Criteria:

I don't plan on publishing it in packagecontrol.io because I can't think of an use case for this within Sublime. Considering this is made with bat in mind, I wanted to know if you'd consider including it.

It would be a nice alternative to man.sublime-syntax, the currently recommended syntax to use with help messages.

cmd-help is more selective about what it scopes (only definitions, not descriptions) and it also covers some syntax patterns that man doesn't need to. Help messages are way more free-form than man pages.

It already gets many commands just right, scoping most things as intended. More importantly, its rate of false positives is negligible (on a sample of 40+ help messages).

I'm still actively working on this, but it's definitely ready for prime time. Can I PR this syntax?

@keith-hall
Copy link
Collaborator

I don't plan on publishing it in packagecontrol.io because I can't think of an use case for this within Sublime. Considering this is made with bat in mind, I wanted to know if you'd consider including it.

I personally vote yes :) it feels like a good fit to me - nice work :)

@Enselic
Copy link
Collaborator

Enselic commented Mar 30, 2022

Sounds like a good idea to me, and I can see you've already made good progress. I also vote yes. I would probably start using it myself 😇

@victor-gp
Copy link
Contributor Author

Thanks for your nice words ^^

@Enselic: help yourself! (Pun intended.) Please do report anything that doesn't quite work so I can fix it. Also, if I plan to make major changes in the future (like re-scoping things), can I @mention you there for feedback?

@keith-hall: other than this, I have 2-3 ideas to improve Manpage.sublime-syntax. Nothing big (definitely not multi-scoping! XD), just tweaks on how the syntax targets some man elements and also what I did on cmd-help to avoid scoping normal text as headings (only useful for help messages, I think, but shouldn't break manpages). Maybe we can discuss them in another channel, or I just open another issue?

@keith-hall
Copy link
Collaborator

As the Manpage syntax definition is part of this repo, I'm fine with you just opening another issue (or PR) to discuss improvements :)

@victor-gp
Copy link
Contributor Author

Cool, I'll code and PR those when I have time. Should be pretty small changes so we can discuss them with the code in hand.

Back on topic, as sharkdp also reacted positively to the first post, I'll be moving forward with the PR in the next few days.

I'm closing this issue. Thanks for the feedback :)

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

No branches or pull requests

3 participants