jml / undistract-me

Notifies you when long-running terminal commands complete
Other
541 stars 47 forks source link

Doesn't work if PROMPT_COMMAND is set by something else #20

Open jml opened 11 years ago

jml commented 11 years ago

This just bit a new user.

Not sure we can fix it, but we should at least document it.

caneff commented 11 years ago

That was me. I just tried adding the undistract-me stuff to the end of the .bashrc file, after all my other PROMPT_COMMAND stuff was defined, and it seems to work now.

anarcat commented 5 years ago

I just tried adding the undistract-me stuff to the end of the .bashrc file, after all my other PROMPT_COMMAND stuff was defined, and it seems to work now.

can you clarify how you fixed this exactly? I'm also having the issue that i have weird behavior when other PROMPT_COMMAND functions are set... for example, i see this:

anarcat@curie:powerline(master)$ true
anarcat@curie:powerline(master)$ sleep 13
"true" took 14 secs

I have a "__prompt_command" function to do hacks on my prompt, which I added this way:

PROMPT_COMMAND="__prompt_command;${PROMPT_COMMAND}";

I also tried the other way:

PROMPT_COMMAND="${PROMPT_COMMAND};__prompt_command";

no luck...