Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Problems with precmd/urxvt



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 }



Messages sorted by: Reverse Date, Date, Thread, Author