Page MenuHomeMusing Studio

configurable defaults
Closed, ResolvedPublic

Description

using config.ini at the user directory root, save a default host for actions.

do the same within each [host] for default user

Event Timeline

@robjloranger How does this work right now? After playing around with wf-cli this is definitely the default behavior I'd like to see, but I'm not seeing it work that way.

I can double check, but I believe it was working last I tried.

It should use whatever host is set in the root ini file by default and whatever user is set in the host level ini file.

Everything still seems to be working as I remember. Can you tell me more about what isn't working like you expect?

I should add that the config.ini should have a default section. i.e.

[default]
host = https://my.instance.com

Right now there's no config.ini file being created in my ~/.writefreely... But it's entirely possible I messed something up. I'm looking into it now

Weird I email responded but it didn't come through.

This explains your issue though, the file is currently manually created. I haven't made the config wizard yet or any automated preference storage

Ah, gotcha. I'll add that in then.

When first authenticating, I'll have it automatically set that username / host as the default. Then with T596: add config wizard, users will be able to switch defaults.

Cool, and maybe not overwrite the default if there is one. Users would likely expect when editing the config file it should retain their defaults.

Yep, if there's already a default set when running auth it won't be overwritten. And there will be a message displayed either way. The idea with setting it that first time is to make that process more seamless, and save people some typing.