-
Notifications
You must be signed in to change notification settings - Fork 809
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
Implement safe shell reloading inside omf plugin #266
Conversation
👍 💯 for the code. The new CLI command needs docs. |
I always forget the docs |
5b34651
to
3a30ddf
Compare
Docs are there. Rebased to current master. |
Recommends #276 |
I’m a bit hesitant to merge this right now, partially because we haven’t heard from @CoderStephen @bpinto or @scorphus, and partially because refreshing to replace the shell process on Since core doesn’t call If we remove the calls from |
Or we could add a config var so we could all opt in to the automatic |
👍 I like the config var option. |
This PR works hard to fix the side effects of
This makes the reload process very safe regarding to shell state.
The expected behaviour of
Automatic reload is a great feature. I remember friends of mine hating legacy omf because of the constant shell close/reopen, before I taught them |
I'm actually going to agree with @derekstavis on this. Not only would Adding a config var to disable automatic reload would be OK I guess, but I prefer things to just work simply without configuration. If |
With clarification from @bobthecow, I suggest we introduce a config variable for now that enables automatic reload. The variable must be set to enable the feature; then it can undergo a lot of use over the next few months when we can eventually enable it permanently. I'm 👍 for a merge after this is done. |
This commit adds an improved reload code for Oh My Fish, besides saving the history now the reloading technique keeps directory history and stack and clears fish_greeting, for a transparent transition. The reloading code is now safe regarding to background jobs. exec wipes fish job control, so the user-facing code under the (just- introduced by this commit) `omf reload` command is kept safe by a warning. For testing purposes, `omf update` and `omf remove` rolls automatic refresh only when `OMF_AUTO_RELOAD` variable is set. Recap of the commit: - Add improved reload code (omf.reload) - Add a safe reload code (omf.cli.reload) - Add `omf reload` command - Add opt-in reload to `omf update` and `omf remove` commands
This commit adds an improved reload code for Oh My Fish, besides
saving the history now the reloading technique keeps directory
history and stack and clears fish_greeting, for a transparent
transition.
The reloading code is now safe regarding to background jobs. exec
wipes fish job control, so the user-facing code under the (just-
introduced by this commit)
omf reload
, and usages underomf remove
andomf update
are now kept safe by a warning.Recap of the commit:
omf reload
command