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

Make --help output more detailed. #70

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sebastiancarlos
Copy link

@sebastiancarlos sebastiancarlos commented Nov 28, 2023

Hello,

For my personal use, I updated the --help output to clarify a bit the behavior (particularly highlighting the importance of putting everything compiler-related in the first argument, and the need for a final -- in that argument when used as a shebang.

Current --help:

Usage: c <file.c ... | compiler_options ...> [program_arguments]
       c --clear-cache
Execute C programs from the command line.

  Ex: c main.c
  Ex: c main.c arg1 arg2
  Ex: c 'main.c other.c' arg1 arg2
  Ex: c 'main.c -lncurses' arg1 arg2

This PR's --help:

Usage:
       c '<file.c ... | compiler_options ...>' [program_arguments]
       c --clear-cache

Usage for shebang with extra compiler options:
       c '<other.c ... | compiler_options ...> --' <file.c> [program_arguments]

Execute C programs from the command line.

  Ex: c main.c
  Ex: c main.c arg1 arg2
  Ex: c 'main.c other.c' arg1 arg2
  Ex: c 'main.c -lncurses' arg1 arg2

Execute C programs when "main.c" is executable with shebang.

  Shebang: #!/usr/bin/env c
  Shebang: #!/usr/bin/env -S c 'other.c --'
  Shebang: #!/usr/bin/env -S c '-lncurses --'
  Ex:      ./main.c
  Ex:      ./main.c arg1 arg2

Feel free to merge if you like it. Cheers!

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.

1 participant