shell-pool / shpool

Think tmux, then aim... lower
Apache License 2.0
1.03k stars 13 forks source link

Config file is ignored #24

Closed gonsp closed 1 month ago

gonsp commented 1 month ago

What happened I created a config file: ~/.config/shpool/config.toml I want to remove the prompt, so the content of the file is: prompt_prefix = "" This setting is ignored. I also tried to add other setting like session_restore_mode which is also ignored. I know that the file is at least read because I experimented by inserting some syntactic error, and that makes the tool to crash when attaching to a new session. I tried to also specify the config file when creating the new session: shpool -c ~/.config/shpool/config.toml attach -f main

What I expected to happen Apply the config from the config file

Version info shpool 0.6.0

ethanpailes commented 1 month ago

You probably need to restart your daemon with systemctl --user restart shpool. I just cut version 0.6.1, which includes a file watcher so that config changes get live-reloaded to avoid this (though I'm not sure that it will handle going from no config to some config well, I should probably check).

gonsp commented 1 month ago

Nice, it works! I'm puzzled about what the "-c" flag is supposed to do then

ethanpailes commented 1 month ago

The -c flag is a universal flag that can get passed along with any subcommand, and it applies to the shpool process it is passed to. When you use shpool there are actually two processes in play though, the shpool attach process is the client process, which talks to the daemon (shpool daemon) via a unix domain socket. The daemon process is managed by systemd and not affected by the flags you pass into your shpool attach invocation. I can definitely see how this is confusing though. Hopefully the new config watcher will improve the situation.