zsh:rmdir(): Don't change PWD when removing fails
This commit is contained in:
@@ -738,8 +738,8 @@ rmdir() {
|
|||||||
|
|
||||||
if (( $# == 1 )) && [[ $1 == '.' ]]; then
|
if (( $# == 1 )) && [[ $1 == '.' ]]; then
|
||||||
to_del="$PWD"
|
to_del="$PWD"
|
||||||
cd ..
|
pushd -q ..
|
||||||
command rmdir "$to_del"
|
command rmdir "$to_del" || popd -q
|
||||||
else
|
else
|
||||||
command rmdir "$@"
|
command rmdir "$@"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user