-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
cleanup: CLI global flags #3365
Comments
Unfortunately Fetches or compiles:
Strictly runtime:
Also |
@bartlomieju maybe it's not good time to implement right now but I'd like to remind my comment in issue #2081 with the idea of single-letter shortcuts for the permission parameters - which I tend to use multiple times per invocation, e.g.: deno run --allow-read=config.json --allow-read=html \
--allow-write=server.log --allow-net=:8000 server.ts vs: deno -R=config.json -R=html -W=server.log -N=:8000 server.ts My idea was to reserve all uppercase single-letter parameters for permission shortcuts. Maybe it's good time to revisit the idea. Also, I was thinking about a separate permission for listening and for outgoing network connections (like there is a separate read and write for the file system) which was I remember that you also had an idea for (Some ideas like |
I don't have strong opinion on this one, @ry?
Probably makes sense, but I'd open a new issue to discuss that, I meant this issue to only cleanup current situation without any new features.
Yeah, ideally it would be some Web standard file that keeps it all (ref #3179) |
I'd rather not introduce single letter abbreviations at this point for the permission arguments. Maybe we can later, but for now let's be explicit. |
Done in #3389 |
Was |
We arrived yet again to the point where we need to cleanup our CLI flags.
Current output:
Most of the flags listen in
OPTIONS
section shouldn't be global and only available torun
(deno run script.ts
,deno script.ts
) andfetch
(deno fetch script.ts
) subcommands.IMHO I think following flags shouldn't be global:
--allow-*
- for other subcommand we override flags anyway--config
--current-thread
- intricate runtime setting--import-map
--lock
--lock-write
--no-fetch
- onlyrun
subcommand--v8-flags
--v8-options
Additionally some cleanup:
xeval
subcommand (ref move xeval to std/examples/xeval.ts #3230)[SCRIPT]
subcommand that is visible - this is a hacky way to handledeno script.ts
and I don't think it should be visible in help output, also shell completion is broken for it (ref zsh completion is broken #3310)version
- do we really needdeno -v
,deno --version
anddeno version
? It might be cumbersome to configure that in ClapAlso, having
deno script.ts
anddeno run script.ts
would still mean that all flags specific torun
subcommand should be printed withdeno -h
, but shouldn't be visible with eg.deno fmt -h
The text was updated successfully, but these errors were encountered: