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

Inaccurate recorded runtime when using PROMPT_COMMAND with bash #42

Open
grosser opened this issue Nov 27, 2022 · 1 comment
Open

Inaccurate recorded runtime when using PROMPT_COMMAND with bash #42

grosser opened this issue Nov 27, 2022 · 1 comment

Comments

@grosser
Copy link

grosser commented Nov 27, 2022

time git diff
real	0m0.109s
user	0m0.054s
sys	0m0.025s

but then:

│ NY44PMJ44K  ~/dotfiles  Nov 27 2022 10:12:56 PST  11.246s   0          git diffc                                                                                 

so this seems to be "time since last command execution"

can reproduce with this:

function prompt_func() {
  PS1="TEST"
}

export PROMPT_COMMAND=prompt_func 2>/dev/null

# Hishtory Config:
export PATH="$PATH:/Users/mgrosser/.hishtory"
source /Users/mgrosser/.hishtory/config.sh

should be fixed or readme should document a workaround or should detect the issue and complain+advise

@ddworken ddworken changed the title runtime is wildly wrong when using PROMPT_COMMAND Inaccurate recorded runtime when using PROMPT_COMMAND with bash Nov 27, 2022
@grosser
Copy link
Author

grosser commented Dec 18, 2022

hmm actually that also happens when the prompt command is disabled
maybe it's a general bash issue ... at least idk what to look for anymore 🤷

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

1 participant