Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Improvements to the help menu (+colours) #22

Merged
merged 4 commits into from Sep 24, 2022
Merged

Improvements to the help menu (+colours) #22

merged 4 commits into from Sep 24, 2022

Conversation

hrszpuk
Copy link
Owner

@hrszpuk hrszpuk commented Sep 24, 2022

Improvements made

Issues with the original help menu

The original help menu (the help menu that is currently used in the master branch as of the time of this commit) is rather ugly and does not help the user understand what each command does.

Original help menu for reference:

ReCTx :: Help Menu

Usage: rectx <command> [options]

Commands:
  help          -> shows this menu
  new [name]    -> creates a new project
  run           -> runs the current project
  build         -> builds the current project

For more information visit the GitHub page: https://github.com/hrszpuk/rectx

The brief description given for each command is very basic, in fact, you gather about has much information from the command name itself as the description give you (e.g. "run" obviously runs the project code). Furthermore, the information is not coloured whatsoever which can make it head to read, and hard to pick out important information.

In the original help menu, only one command has a more detail explanation...

Original help menu for the new command:

ReCTx :: Help Menu :: "new"

Usage: rectx new project-name

This command will create a new ReCT project with the name provided.
The project will contain: /src/main.rs, README.md, and config.toml!

For more information visit the GitHub page: https://github.com/hrszpuk/rectx

The information is still brief and does not highlight the important information. The information in this help menu is also outdated. Other commands such as 'build' and 'run' do not have their own help menu which, despite not the commands name being self-explanatory, leaves more specific information about the commands (such as configuration with config.toml) unknown to the user.

The new help menu

The new help menu aims to use colours to highlight more important information, and provide a way for users to see more information about a command.

The help command (rectx help) can now accept a <command> argument for the command the user wishes to understand more. Examples: rectx help new rectx help build rectx help run

.gitignore now has .idea stuff and Rust stuff.
cargo.toml now has the colored package for command line colours.
the LICENSE has been updated
Now it looks like:
-----------------------------
ReCTx Project Manager v1.0.0
-----------------------------
Usage: rectx <command>

[Commands]
Help     : rectx help    : Shows this help message.
New      : rectx new     : Creates a new ReCTx project.
Build    : rectx build   : Builds the current ReCTx project.
Run      : rectx run     : Runs the current ReCTx project.

For more information check out the GitHub page: https://github.com/hrszpuk/rectx
or join the ReCT Discord server: https://discord.gg/Ymm9xGxWZf
All help menus now have colour.
All commands now have their own help menu:
rectx help help
rectx help run
rectx help build
rectx help create|new

Create is now a valid alias for new.
There are now commands to help generate the help menus, this is to reduce duplicate code.
I've added a help module and renamed some public help module functions to better organise code.
@hrszpuk hrszpuk added documentation Improvements or additions to documentation enhancement New feature or request cli module labels Sep 24, 2022
@hrszpuk hrszpuk added this to the Release v2.0.0 milestone Sep 24, 2022
@hrszpuk hrszpuk self-assigned this Sep 24, 2022
@hrszpuk hrszpuk linked an issue Sep 24, 2022 that may be closed by this pull request
Copy link
Owner Author

@hrszpuk hrszpuk left a comment

Choose a reason for hiding this comment

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

Forgot to mention, this PR also moves all help command stuff into a sub-module of cli called help. Adds .idea and Rust stuff to the .gitignore, and more.

@hrszpuk hrszpuk merged commit 2afa463 into develop Sep 24, 2022
@hrszpuk hrszpuk deleted the help-menu branch September 24, 2022 17:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Better/nicer help menu
1 participant