From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14892 invoked by alias); 4 Aug 2012 06:08:54 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17192 Received: (qmail 28498 invoked from network); 4 Aug 2012 06:08:43 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at ucsc.edu does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucsc.edu; s=ucsc-google; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version:x-mailer; bh=jVoda5liAwcMcaMieZ0l27xnDpKHujm8xw1DYEoZbok=; b=lelvLC+/b8+qRmyPH9tFN0RkqXpvRTN+STSVxb++MkoqD3uXpIoAPY1za2fAM1uzpB 7a1B2JO5wWs/Vuc+IfTtZBdr2ye5jQ2aRfxAWc6U3C+KCDiYb9Jq/KqlABG/UyF5wvok xSB8V1GVrbVPvb0cgLIQKaq0L5J8SepPE1Hzw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:content-type:content-transfer-encoding:subject:message-id:date :to:mime-version:x-mailer:x-gm-message-state; bh=jVoda5liAwcMcaMieZ0l27xnDpKHujm8xw1DYEoZbok=; b=nNbJ2gcguPpATVHmDGj6q7BH3m7uI6okLoApJxDl5+V93nds9QKSju3tszgk3LkqWL Jz2frHj7cs85fsQzeT1Yw17vHLgK0ZG60EdtBEIyri21RZpWDoheI7iYq65/oDNLCnwu RwVGc9AP1VkLSJkbnMdopWpcABDFWD71qFYYZmKQO8KnNkivzYIro4LDAX7inZh5EzCj dHbpl5CW+49JNg4JTh6MCjASAa2/rkzkWYaJj2LpkocXCbUKAIwLuNQrC6wnt+nedCvs o1UiPg18pbQqsVE3oQUAAqkbFi3AfOoue6xMMSfdmq/XN+l4YoB0lHIVcHUxUYNdosQR ovWw== From: "William G. Scott" Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Subject: command completion notification Message-Id: <61BB4B35-A02F-44F8-B793-A7F90543D25F@ucsc.edu> Date: Fri, 3 Aug 2012 23:08:31 -0700 To: zsh-users@zsh.org Mime-Version: 1.0 (Mac OS X Mail 6.0 \(1482\)) X-Mailer: Apple Mail (2.1482) X-Gm-Message-State: ALoCoQktYXIN5T2uZr2j/9cxz8OHISOvnl52bheWd+D6YdcapVk1d1RUUA3oPBbHGhSDKatMyZc0 Forgive me, as it has been a few years since my last email=85 In OS X, 10.8 (aka Mtn Lion), Apple has introduced a notification = system. Using gem, I installed a command-line utility called = terminal-notifier. I wrote a simple function to test its capabilities: function tnot { "$@" && terminal-notifier -message "$( echo $@ ) = returned $?" -title "Command $HISTCMD Completed" >|/dev/null } Now if I issue a command like tnot sleep 12 It will post a notification on the screen and log the notification to = the so-called notification center where all the nagging notices pile up. This isn't particularly elegant. I would rather use this as a preexec = function, or something similar, so I wouldn't have to explicitly type = "tnot". However, there are only a small subset of commands I would want = to bind to a notification. Is it straightforward to somehow bind this to, say, control-return, or = some other modified return key sequence? Thanks. Bill Scott William G. Scott Professor Department of Chemistry and Biochemistry and The Center for the Molecular Biology of RNA 228 Sinsheimer Laboratories University of California at Santa Cruz Santa Cruz, California 95064 USA =20