From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29503 invoked by alias); 23 Sep 2013 21:37:21 -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: 17994 Received: (qmail 2715 invoked from network); 23 Sep 2013 21:37:08 -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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.219.52 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=zo/DAGgYIVQDN3x6rvz3j7jqXKxjRb5RTgFL7Nea9Uk=; b=B26UtMqL+BTdv7EW+rPy8ubI2BnXs/2C24WrPsi129WhwBIb81OFikWO4qWdlb9Xh6 608nVifHl2FyfXcWZAHapZKHYHeRr4OP1s/tD6Jyg+3dx6rG8D3lRg2F6If7ojMADvtg S8XsPs/fW851wbF5IMgXbxXktft+4O104isX+muuUKx8CwC6Qss0ocAFPHrk8y90ayG5 HLDcF7xmiSez1Z8n/0QShLT3zUxeP+7fXLE/tmkTVVXOZRBxtOBqeT893BfSm124050d o8JbLWAhvPsHH9QiDTUXnoglI5FoCMqiXNO/Q12SMFr0Vqq6KANIc+ZZUV+3b485kGM8 2ysw== X-Received: by 10.60.144.8 with SMTP id si8mr241093oeb.97.1379972220240; Mon, 23 Sep 2013 14:37:00 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: From: Hauke Petersen Date: Mon, 23 Sep 2013 23:36:19 +0200 Message-ID: Subject: Re: Colored-character displayed on CTRL-C ? To: "zsh-users@zsh.org" Content-Type: text/plain; charset=ISO-8859-1 On Mon, Sep 23, 2013 at 7:37 PM, Larry Schrof wrote: > I'd really like ideas on the best way to tell zsh to display a > character with a yellow background on CTRL-C, followed by taking > me to a new prompt on the next line. One attempt: [[ -o interactive ]] && function TRAPINT { zle && print -nP '%B%S^C%s%b' return $(( 128 + $1 )) } `[[ -o interactive ]]' is to only define the trap in interactive shells. `zle && ...' to only print ^C when the line editor is active. `print -P' interprets prompt escape codes. %B and %b mark bold, %S and %s standout/invert. That's the same format as the default PROMPT_EOL_MARK. You can find other formatting options (prompt escapes) in zshmisc(1). -- [Resending this, evil gmail tried to keep it off the list.]