actually… the error paths didn’t se-unset noglob! after looking at the
code, until further proof I believe noglob is not even needed ⇒ drop it
This commit is contained in:
parent
5ac24244fd
commit
5c1108c5fa
17
dot.mkshrc
17
dot.mkshrc
@ -1,5 +1,5 @@
|
||||
# $Id$
|
||||
# $MirOS: src/bin/mksh/dot.mkshrc,v 1.66 2011/11/25 23:43:59 tg Exp $
|
||||
# $MirOS: src/bin/mksh/dot.mkshrc,v 1.67 2011/11/25 23:54:06 tg Exp $
|
||||
#-
|
||||
# Copyright (c) 2002, 2003, 2004, 2006, 2007, 2008, 2009, 2010, 2011
|
||||
# Thorsten Glaser <tg@mirbsd.org>
|
||||
@ -75,10 +75,8 @@ function cd_csh {
|
||||
}
|
||||
function dirs {
|
||||
local d dwidth
|
||||
local -i isnoglob=0 fl=0 fv=0 fn=0 cpos=0
|
||||
local -i fl=0 fv=0 fn=0 cpos=0
|
||||
|
||||
[[ $- = *f* ]] && isnoglob=1
|
||||
set -o noglob
|
||||
while getopts ":lvn" d; do
|
||||
case $d {
|
||||
(l) fl=1 ;;
|
||||
@ -117,15 +115,12 @@ function dirs {
|
||||
done
|
||||
print
|
||||
fi
|
||||
(( isnoglob )) || set +o noglob
|
||||
return 0
|
||||
}
|
||||
function popd {
|
||||
local d fa
|
||||
local -i isnoglob=0 n=1
|
||||
local -i n=1
|
||||
|
||||
[[ $- = *f* ]] && isnoglob=1
|
||||
set -o noglob
|
||||
while getopts ":0123456789lvn" d; do
|
||||
case $d {
|
||||
(l|v|n) fa="$fa -$d" ;;
|
||||
@ -156,15 +151,12 @@ function popd {
|
||||
unset DIRSTACK[n]
|
||||
set -A DIRSTACK -- "${DIRSTACK[@]}"
|
||||
cd_csh "${DIRSTACK[0]}" || return 1
|
||||
(( isnoglob )) || set +o noglob
|
||||
dirs $fa
|
||||
}
|
||||
function pushd {
|
||||
local d fa
|
||||
local -i isnoglob=0 n=1
|
||||
local -i n=1
|
||||
|
||||
[[ $- = *f* ]] && isnoglob=1
|
||||
set -o noglob
|
||||
while getopts ":0123456789lvn" d; do
|
||||
case $d {
|
||||
(l|v|n) fa="$fa -$d" ;;
|
||||
@ -201,7 +193,6 @@ function pushd {
|
||||
set -A DIRSTACK -- placeholder "${DIRSTACK[@]}"
|
||||
cd_csh "$1" || return 1
|
||||
fi
|
||||
(( isnoglob )) || set +o noglob
|
||||
dirs $fa
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user