zsh-users
 help / color / mirror / code / Atom feed
From: Aaron Davies <aaron.davies@gmail.com>
To: zsh-users@zsh.org
Subject: Re: Would like an alias to read the part of the current command line that precedes the alias
Date: Mon, 7 Nov 2011 00:12:20 -0500	[thread overview]
Message-ID: <CACQi4XA_JKo6K7dCAnQz2RiQM8RcdEcZgoeQ4CAJo-MMPFNtww@mail.gmail.com> (raw)
In-Reply-To: <111013123237.ZM9529@torch.brasslantern.com>

On Thu, Oct 13, 2011 at 3:32 PM, Bart Schaefer
<schaefer@brasslantern.com> wrote:

>    typeset -g _LASTALERT=$HISTCMD
>    preexec() {
>      SECONDS=0
>    }
>    precmd() {
>      local alert="${${?/0/Terminal}//<->*/Problem Reporter}"
>      (( _LASTALERT < HISTCMD && SECONDS > 1 )) &&
>        growlnotify -p "Very Low" -a "$alert" -m "$history[$_LASTALERT]"
>      _LASTALERT=$HISTCMD
>    }

looks great, thanks!
-- 
Aaron Davies
aaron.davies@gmail.com


  reply	other threads:[~2011-11-07  5:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-10 23:15 dg1727
2011-10-11  2:05 ` Bart Schaefer
2011-10-13  3:15   ` Aaron Davies
2011-10-13 19:32     ` Bart Schaefer
2011-11-07  5:12       ` Aaron Davies [this message]
2011-10-10 23:21 dg1727

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CACQi4XA_JKo6K7dCAnQz2RiQM8RcdEcZgoeQ4CAJo-MMPFNtww@mail.gmail.com \
    --to=aaron.davies@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).