View Review Details
| Book: |
|
Learning the bash Shell |
| Subject: |
|
maybe a bug in pushd() at 5.1.1 |
| Date: |
|
2006-02-12 18:40:08 |
| From: |
|
Chelski
|
|
|
|
the pushd() funtion in section 5.1.1:
pushd ( )
{
dirname=$1
if cd ${dirname:?"missing directory name."}
then
DIR_STACK="$dirname ${DIR_STACK:-$PWD' '}"
echo $DIR_STACK
else
echo still in $PWD.
fi
}
should it be:
pushd ( )
{
dirname=$1
oldpwd=$PWD
if cd ${dirname:?"missing directory name."}
then
DIR_STACK="$dirname ${DIR_STACK:-$oldpwd' '}"
echo $DIR_STACK
else
echo still in $PWD.
fi
} ?
|
|
| |