diff --git a/.local/bin/scripts/ex b/.local/bin/scripts/ex index fd8cbf2..2c17d6e 100755 --- a/.local/bin/scripts/ex +++ b/.local/bin/scripts/ex @@ -34,7 +34,8 @@ for arg do esac test "$(basename "$PWD")" = "$namepart" && if test $# -lt 2 -a "$(ls -U | wc -l)" -lt 3 - then mv * .. && cd .. && rm -d "$namepart" + then test "$(ls)" && mv * .. + cd .. && rm -d "$namepart" else cd .. && mv "$namepart" "$name" fi )