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

oli: Introduce command oli config #1781

Closed
knight42 opened this issue Mar 27, 2023 · 6 comments
Closed

oli: Introduce command oli config #1781

knight42 opened this issue Mar 27, 2023 · 6 comments

Comments

@knight42
Copy link
Contributor

knight42 commented Mar 27, 2023

Related: #422 RFC

oli config is responsible for managing user configuration files. It consists of several subcommands:

  • oli config set-profile: update or add a profile in the current config
    • Usage: oli config set-profile <name> <type> [options]..., e.g:
    • oli config set-profile mys3 s3 bucket=foo access_key_id=bar
  • oli config delete-profile: delete the given profile from the config
    • Usage: oli config delete-profile <name>
  • oli config edit: edit the config file from the default editor
    • Usage: oli config edit
    • It will open the editor defined by your OLI_EDITOR environment variable, or fall back to 'vi' for Linux or 'notepad' for Windows.
  • oli config view: print out the current config
@Xuanwo
Copy link
Member

Xuanwo commented Mar 27, 2023

I prefer to add this subcommand after all others have been added.

@suyanhanx
Copy link
Member

  • oli config add-profile: add a profile to the current config

How about using set to express simpler semantics? Then It can both represent add and override.

@knight42
Copy link
Contributor Author

I prefer to add this subcommand after all others have been added.

@Xuanwo May I know the reason? With this command, I think users can edit/update config file more conveniently.

How about using set to express simpler semantics? Then It can both represent add and override.

@suyanhanx A good idea! I think the command name could be set-profile, as the config file might have options other than profiles, as the RFC said:

  • OIL_COLOR=always
  • OIL_CONCURRENCY=16

@suyanhanx
Copy link
Member

A good idea! I think the command name could be set-profile, as the config file might have options other than profiles, as the RFC said:

Yes. That's what I mean.

@Xuanwo
Copy link
Member

Xuanwo commented Mar 27, 2023

With this command, I think users can edit/update config file more conveniently.

You are right. But users can still use oli without config support. And users nearly use cli to change config. So I think it's less important than other features.

It's a feature that good to have instead of must have.

@Xuanwo
Copy link
Member

Xuanwo commented Mar 30, 2023

I don't think it's a good idea to add oli config at the moment. Let's reconsider this matter when we receive feature requests from actual users.

@Xuanwo Xuanwo closed this as not planned Won't fix, can't repro, duplicate, stale Mar 30, 2023
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

No branches or pull requests

3 participants