Skip to content

Conversation

saccarosium
Copy link
Contributor

This PR make the following change:

  1. make the interpreter usr/bin/env bash to make it use wathever version the system has even installed in different places
  2. instead of having a wall off echos, uses the much cleaner EOF to cat
  3. make so the program exit without errors when display usage
  4. format code for better styling
  5. set default values if any value is given

@kdheepak
Copy link
Owner

Thanks for the PR! Wow, that’s a significant improvement.

Regarding default values, one reason I didn’t want to do that was because I wanted to catch bugs early on if I didn’t pass the correct argument. But this certainly helps users if they want to run the script directly. Is that what you are trying to use it for?

@saccarosium
Copy link
Contributor Author

Is that what you are trying to use it for?

Yes, I use the script to bootstrap the documentation from a markdown file. Then, when I generated the docs, I prefer modifying the vimdoc manually because it is much more easy to make it look good.

The reason I think having default values is nice, is so you don't have to type a very long onliner to simply convert quickly a markdown document into a vimdoc.

@kdheepak kdheepak merged commit 68fecd7 into kdheepak:main May 27, 2023
@kdheepak
Copy link
Owner

Thanks for the PR!

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