From 72c895c4a12cf2a38b9b58e0c5147edba1a657f6 Mon Sep 17 00:00:00 2001 From: tg Date: Mon, 21 Jan 2013 15:06:24 +0000 Subject: [PATCH] =?UTF-8?q?precmd=20is=20required=20to=20retain=20the=20er?= =?UTF-8?q?rorlevel=20when=20${=20=E2=80=A6;}=20is=20used?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dot.mkshrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dot.mkshrc b/dot.mkshrc index f75e576..6d59de4 100644 --- a/dot.mkshrc +++ b/dot.mkshrc @@ -1,8 +1,8 @@ # $Id$ -# $MirOS: src/bin/mksh/dot.mkshrc,v 1.73 2012/11/30 20:19:10 tg Exp $ +# $MirOS: src/bin/mksh/dot.mkshrc,v 1.74 2013/01/21 15:06:24 tg Exp $ #- # Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 +# 2011, 2012, 2013 # Thorsten Glaser # # Provided that these terms and disclaimer and all copyright notices @@ -29,6 +29,8 @@ function precmd { local e=$? (( e )) && print -n "$e|" + # precmd is required to retain the errorlevel when ${ …;} is used + return $e } PS1=$'\001\r''${ precmd;}${USER:=$(ulimit -c 0; id -un 2>/dev/null || echo \? )}@${HOSTNAME%%.*}:$(local d=${PWD:-?} p=~; [[ $p = ?(*/) ]] || \