• don’t eat builtin cd errorlevel in function cd
• fix extglob in function cd_csh to match current error strings
This commit is contained in:
parent
5eb6995d75
commit
75c00ebaae
@ -1,5 +1,5 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
# $MirOS: src/bin/mksh/dot.mkshrc,v 1.84 2013/08/10 13:43:50 tg Exp $
|
# $MirOS: src/bin/mksh/dot.mkshrc,v 1.85 2013/08/22 13:46:46 tg Exp $
|
||||||
#-
|
#-
|
||||||
# Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010,
|
# Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010,
|
||||||
# 2011, 2012, 2013
|
# 2011, 2012, 2013
|
||||||
@ -105,14 +105,14 @@ function chpwd {
|
|||||||
}
|
}
|
||||||
chpwd .
|
chpwd .
|
||||||
function cd {
|
function cd {
|
||||||
builtin cd "$@"
|
builtin cd "$@" || return $?
|
||||||
chpwd "$@"
|
chpwd "$@"
|
||||||
}
|
}
|
||||||
function cd_csh {
|
function cd_csh {
|
||||||
local d t=${1/#~/$DIRSTACKBASE}
|
local d t=${1/#~/$DIRSTACKBASE}
|
||||||
|
|
||||||
if ! d=$(builtin cd "$t" 2>&1); then
|
if ! d=$(builtin cd "$t" 2>&1); then
|
||||||
print -u2 "${1}: ${d##*$t - }."
|
print -u2 "${1}: ${d##*cd: $t: }."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
cd "$t"
|
cd "$t"
|
||||||
|
Loading…
Reference in New Issue
Block a user