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

Global configuration #61

Open
ellnix opened this issue Apr 26, 2024 · 1 comment
Open

Global configuration #61

ellnix opened this issue Apr 26, 2024 · 1 comment
Labels
feature Feature request

Comments

@ellnix
Copy link
Collaborator

ellnix commented Apr 26, 2024

When considering things like #20 and various other features #60 we will require to maintain some sort of configuration state.

I made this issue to discuss the interface for it. Assuming that we store it in a toml file to be consistent with the rest of the repo, we will probably have simple key/value strings.

Personally I recommend a git-like syntax:

$ clash config
workspace: not set
editor: not set
$ clash config editor vim
Successfully set editor to vim.
$ clash config
workspace: not set
editor: vim
@ellnix ellnix added the feature Feature request label Apr 26, 2024
@Andriamanitra
Copy link
Owner

The CLI for that would probably be

  • clash config show [KEY] (default to printing the entire config file if KEY is not given)
  • clash config set <KEY> <VALUE>
  • clash config edit (create & open the config.toml file in $EDITOR, not 100% sure if this one is needed)

but to be honest at first stage we just need to have a file, the CLI is easy to add later. Here are the options the config file should contain (eventually, not everything needs to be implemented at once)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature request
Projects
None yet
Development

No branches or pull requests

2 participants