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

Add std/cli, move std/getopt there #1057

Merged
merged 2 commits into from
Nov 29, 2023
Merged

Add std/cli, move std/getopt there #1057

merged 2 commits into from
Nov 29, 2023

Conversation

fare
Copy link
Collaborator

@fare fare commented Nov 28, 2023

Import a bunch of CLI utilities from gerbil-utils into std/cli; tweak them, document them, test them:

  • multicall to support multiple subcommands in a more modular way
  • getopt translation to Scheme calling convention
  • print-exit to print results of Scheme computation at the CLI
  • shell to support escaping strings for the shell

Add a few corresponding utilities to std/error.

Move std/getopt to std/cli/getopt with its brothers; leave a compatibility shim at std/getopt.

Use std/cli/getopt everywhere instead of std/getopt.

Update documentation.

Copy link

netlify bot commented Nov 28, 2023

Deploy Preview for elastic-ritchie-8f47f9 ready!

Name Link
🔨 Latest commit d139a57
🔍 Latest deploy log https://app.netlify.com/sites/elastic-ritchie-8f47f9/deploys/6566a8f2fd77fe0008f76fd4
😎 Deploy Preview https://deploy-preview-1057--elastic-ritchie-8f47f9.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@fare
Copy link
Collaborator Author

fare commented Nov 28, 2023

Replaces #1027

@vyzo
Copy link
Collaborator

vyzo commented Nov 28, 2023

build fails

@fare
Copy link
Collaborator Author

fare commented Nov 28, 2023

It was a rebasing issue (I was using fx>=0?). Fixed.

@fare
Copy link
Collaborator Author

fare commented Nov 28, 2023

Also avoiding defmutable for now. Sigh.

Import a bunch of CLI utilities from gerbil-utils into std/cli;
tweak them, document them, test them:
  - multicall to support multiple subcommands in a more modular way
  - getopt translation to Scheme calling convention
  - print-exit to print results of Scheme computation at the CLI
  - shell to support escaping strings for the shell

Add a few corresponding utilities to std/error.

Move std/getopt to std/cli/getopt with its brothers;
leave a compatibility shim at std/getopt.

Use std/cli/getopt everywhere instead of std/getopt.

Update documentation.
doc/reference/std/cli/shell.md Outdated Show resolved Hide resolved
doc/reference/std/cli/shell.md Outdated Show resolved Hide resolved
@fare
Copy link
Collaborator Author

fare commented Nov 29, 2023

PTAL

Copy link
Collaborator

@chiefnoah chiefnoah left a comment

Choose a reason for hiding this comment

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

LGTM

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.

3 participants