Merged
Conversation
Valid uses of this environment variable don't really include passing
it to subsequent child processes.
I confirmed the fix with:
function fish_prompt
echo "cmd duration [$CMD_DURATION] "
end
cmd duration [0] sleep 2
cmd duration [2002]
Member
|
This will need a note in the release notes, although it seems unlikely that anyone is depending on this behaviour. |
Contributor
|
In theory, someone could have a fish prompt implemented in different programming language using environment variable, but I would consider it unlikely (quick search on GitHub has shown one prompt not written in fish shell using |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Valid uses of the
CMD_DURATIONenvironment variable don't seem to include passingit to subsequent child processes.
I work on the Buck build system at Facebook (http://facebook.github.io/buck/). One of Buck's features is to discard its cache if anything in the calling environment has changed since the last run:
https://github.com/facebook/buck/blob/master/src/com/facebook/buck/parser/Parser.java#L950
For all shells except
fish, this is no problem. However, sincefishexportsCMD_DURATIONto all sub-processes with a different value each time, Buck always discards its cache between runs, so it performs terribly.I confirmed the variable is still available inside the shell by running: