Skip to content

Could the order of commands and args be more flexible? #5429

Answered by epage
Magicloud asked this question in Q&A
Discussion options

You must be logged in to vote

You can mark arguments with global = true on Cli so they are available within PgSql however I would recommend against it.

Generally, the expectation is that a subcommand is self-contained.

Also, this can lead to confusing situations where a global flag exists but doesn't apply to all commands. This can be a form of false-sharing, much like false-sharing in code when doing DRY or memory when using cache lines.

Since you mentioned "being more flexible", one route would allow arguments under pgsql to show up before the command. Again, that generally breaks expectations, especially in understanding commands because they are expected to be read left-to-right. On top of that, this left-to-right…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Magicloud
Comment options

Answer selected by Magicloud
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants