make “set -o nounset” friendly (even though people who use THAT are at own fault, IMO!)
This commit is contained in:
parent
5aa7842d33
commit
bbc0702cdd
@ -1,5 +1,5 @@
|
|||||||
# $Id$
|
# $Id$
|
||||||
# $MirOS: src/bin/mksh/dot.mkshrc,v 1.71 2012/08/17 18:34:20 tg Exp $
|
# $MirOS: src/bin/mksh/dot.mkshrc,v 1.72 2012/10/30 21:04:56 tg Exp $
|
||||||
#-
|
#-
|
||||||
# Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010,
|
# Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010,
|
||||||
# 2011, 2012
|
# 2011, 2012
|
||||||
@ -52,7 +52,7 @@ whence -p hd >&- || function hd {
|
|||||||
|
|
||||||
# Berkeley C shell compatible dirs, popd, and pushd functions
|
# Berkeley C shell compatible dirs, popd, and pushd functions
|
||||||
# Z shell compatible chpwd() hook, used to update DIRSTACK[0]
|
# Z shell compatible chpwd() hook, used to update DIRSTACK[0]
|
||||||
DIRSTACKBASE=$(realpath ~/. 2>&- || print -nr -- "$HOME")
|
DIRSTACKBASE=$(realpath ~/. 2>&- || print -nr -- "${HOME:-/}")
|
||||||
set -A DIRSTACK
|
set -A DIRSTACK
|
||||||
function chpwd {
|
function chpwd {
|
||||||
DIRSTACK[0]=$(realpath . 2>&- || print -r -- "$PWD")
|
DIRSTACK[0]=$(realpath . 2>&- || print -r -- "$PWD")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user