Skip to content
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

Weird output for command duration on Fish 3 #107

Closed
sholladay opened this issue Dec 30, 2018 · 5 comments
Closed

Weird output for command duration on Fish 3 #107

sholladay opened this issue Dec 30, 2018 · 5 comments
Milestone

Comments

@sholladay
Copy link

Hello! 👋

Thanks for this awesome project. I have been a happy user for about a year now.

I just upgraded to Fish 3. Obviously it's very new and I wasn't expecting the prompt to even work necessarily. So far, on the surface at least, it seems to work fine, but I did encounter a display bug with the feature that shows the duration of the previous command.

time sleep 1
        1.00 real         0.00 user         0.00 sys

/tmp 0.000012d 0.000281h 0.016883m
❯ time sleep 10
       10.00 real         0.00 user         0.00 sys

/tmp 0.000116d 0.002779h 0.166767m 10.006s
❯

I'm not sure what causes it to repeat the time in various fractions. I find it amusing, though. We can say it's a feature... 😄

@edouard-lopez edouard-lopez added 🐛 bug something that doesn't works as expected v2.0.0 labels Dec 30, 2018
@edouard-lopez
Copy link
Member

Hi @sholladay,
Thanks for testing the bleeding edge fish version 👍

Could you give the value of $pure_command_max_exec_time and $CMD_DURATION?

echo $pure_command_max_exec_time $CMD_DURATION

Displaying the command duration is determined by:

@edouard-lopez edouard-lopez added 🙏 help wanted needs PR or help on decision and removed 🐛 bug something that doesn't works as expected labels Dec 30, 2018
@edouard-lopez
Copy link
Member

@sholladay What is the exact fish version you are running?

fish --version

There is commits going back and forth between $CMD_DURATION and lowercase $cmd_duration.

@faho Could you clarify how we should manage this?

@faho
Copy link
Contributor

faho commented Dec 30, 2018

@faho Could you clarify how we should manage this?

It already is managed.

This happens because the new math builtin defaults to float. To get integers like before, you have to add an explicit scale argument.

Which I've already done in d0a6427.

@sholladay: Please upgrade pure!

@faho
Copy link
Contributor

faho commented Dec 30, 2018

Oh, and "$cmd_duration" was a mistake that we've gone back on. There is no release with that name, so please continue to use $CMD_DURATION everywhere!

@edouard-lopez edouard-lopez removed the 🙏 help wanted needs PR or help on decision label Dec 30, 2018
@sholladay
Copy link
Author

Ooof. Don't do what I did. I ran fisher up to update pure and everything went to hell. First follow the migration guide for fisher v3! There is a section on how to get yourself out of that mess if it's too late.

Anyway, I got it all sorted out. Fish, fisher, and pure are all up to date and working well. 😀

Thanks for your help, all!

❯ fish --version
fish, version 3.0.0

/tmp
❯ fisher --version
fisher version 3.1.1 ~/.config/fish/functions/fisher.fish

/tmp
❯ time sleep 10
       10.00 real         0.00 user         0.00 sys

/tmp 10s
❯ echo $pure_command_max_exec_time $CMD_DURATION
5 10018

@edouard-lopez edouard-lopez modified the milestone: v2.0.0 Jan 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants