forked from ocaml/opam
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update switch environment file from env_hook
If the environment file is missing, recomputing it can take a noticeable amount of time which delays every single return of the prompt when the env_hook is enabled. The use of atomic write on the environment file instead of a lock means that the environment hooks can store the generated environment file if it's missing, or needs regenerating.
- Loading branch information
Showing
4 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
alias precmd 'eval `opam env --shell=csh --readonly`' | ||
alias precmd 'eval `opam env --shell=csh`' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
function __opam_env_export_eval --on-event fish_prompt | ||
eval (opam env --shell=fish --readonly 2> /dev/null) | ||
eval (opam env --shell=fish 2> /dev/null) | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters