It's Bruno

Hey, I'm Bruno 👋

I'm a software engineer with experience in design, development and testing of web-based applications.
You can find me on twitter or write an email.
September 26, 2014

Be notified of slow shell commands

Quick tip for not losing focus when running slow command-line tasks, such as bundle install or god forbid gem install nokogiri.

After reading this post about an utility to notify you of long running tasks (Linux only), I decided to clone it using just zsh and a ruby gem.

Put this in your .zshrc, .bashrc or equivalent: {% highlight bash %} function lmk() { eval $* terminal-notifier -message “Done: $*” } {% endhighlight %}

This snippet declares a function lmk (let me know) that will execute whatever is passed to it $*, and then use terminal-notifier to show a notification.

Make sure you install terminal-notifier by using: {% highlight bash %} gem install terminal-notifier


brew install terminal-notifier {% endhighlight %}

Load the lmk function, if not available yet source ~/.zshrc and test it:

{% highlight bash %} lmk sleep 10 {% endhighlight %}

You should see something like this:

Awesome, right?

Made in São Paulo ☂️