Skip to content
This repository has been archived by the owner on Oct 15, 2022. It is now read-only.

Show and update lorri daemon status in shell #486

Open
rvl opened this issue Dec 31, 2020 · 0 comments
Open

Show and update lorri daemon status in shell #486

rvl opened this issue Dec 31, 2020 · 0 comments

Comments

@rvl
Copy link

rvl commented Dec 31, 2020

Feature description

I really like using lorri/direnv except for two problems that I have. The first is #485. The second is that it's difficult to know when the environment is ready to use.

Because lorri daemon builds the shell asynchronously, the shell environment will be updated some time after lorri detects a changed file. In the meantime, there is nothing to tell the user that their environment is stale. If the build fails, the user will continue to get the cached environment, with no indication that this is not current. It's a confusing situation.

Is it possible for lorri to somehow run shell hook functions when the lorri build status has changed? Alternatively, can lorri be configured to send a signal to a certain PID (e.g. the shell's PID). Possible states would be Started/Completed/Failed/Blocked -- something like that.

With that in place, it would be possible to make a zsh prompt that updates in realtime with the lorri status.

Target users

Everyone, but especially:

  • those who don't understand the internal workings of lorri
  • those with shell.nix files which are slow to build

Metadata

My lorri version is 1.2.0 on NixOS with services.lorri.enable = true;.
My current workaround is to monitor journalctl --user -u lorri.service -f or just disable the systemd service and run lorri watch instead.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant