From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3129 invoked by alias); 3 Dec 2012 15:48:48 -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: 17449 Received: (qmail 23088 invoked from network); 3 Dec 2012 15:48:46 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <121203074835.ZM20740@torch.brasslantern.com> Date: Mon, 03 Dec 2012 07:48:35 -0800 In-reply-to: Comments: In reply to "Yuri D'Elia" "Problems with precmd/urxvt" (Dec 3, 10:20am) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: Problems with precmd/urxvt MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Dec 3, 10:20am, Yuri D'Elia wrote: } } precmd() { print -Pn '\e]2;%~\a' } } } it works ok, but from time to time, when I fire up a new urxvt terminal, } I get the following: } } precmd:print: write error: interrupt I don't have the error, but this probably means urxvt is starting up the shell before it has the window open and is ready to display. You could try something like precmd() { [[ -t 0 && -w 0 ]] && print -Pn '\e]2;%~\a' } but that may not help. } Also, since print is builtin, I wasn't able to silence the error anyway. You can redirect internal errors from builtins by using braces: precmd() { { print -Pn '\e]2;%~\a' } 2>/dev/null }