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

zsh support #12

Open
jml opened this issue Mar 30, 2013 · 8 comments
Open

zsh support #12

jml opened this issue Mar 30, 2013 · 8 comments

Comments

@jml
Copy link
Owner

jml commented Mar 30, 2013

Lots of people want undistract-me to work in zsh.

I'm not 100% convinced that it's a great idea to bundle such support together with the bash code, but not fully convinced the other way either. Leaving this ticket open as a way of documenting the facnt.

@vintaylor
Copy link

Just want to note that there is a solution for zsh in this project: https://github.com/ihashacks/notifyosd.zsh

@flying-sheep
Copy link

Am I missing something? I added the following to my .zshrc, and sleep 11 gave me a notification. So it seems to work already.

source /usr/share/undistract-me/long-running.bash;notify_when_long_running_commands_finish_install

@mhalano
Copy link

mhalano commented Feb 8, 2019 via email

@flying-sheep
Copy link

I see! so the autoactivation part is what isn’t working yet for zsh.

@aioobe
Copy link

aioobe commented Apr 16, 2019

I'm running into the following with zsh (after adding source /usr/share/undistract-me/long-running.bash;notify_when_long_running_commands_finish_install to my .zshrc)

$ sleep 15
preexec:printf:2: %(: invalid directive

@matawed
Copy link

matawed commented Sep 16, 2019

Just to follow up on this...

If you replace printf "%(%s)T with printf "$(date +'%s')" then it works also in zsh.

@TheAllSeeing
Copy link

TheAllSeeing commented Apr 20, 2021

If you are like me just switched into zsh and ran into this, as matawed said, for now
sudo sed -i 's/printf "%(%s)T/printf "$(date +\'%s\')"/' /usr/share/undistract-me/long-running.bash
should fix the issue. It might get overwritten if the package updates though.

@sztomi
Copy link

sztomi commented Dec 21, 2022

I made a fork-of-a-fork of undistract-me for zsh that can be installed with zplug: https://github.com/sztomi/undistract-me-zsh

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

8 participants