Glenn Jackman writes:
> First, if the error message is "should be in an empty directory", then
> why is a empty 2nd argument part of that test?
Well, it is actually "should be empty unless the more than 1 argument is
given", so what's in need of a fix is the error message.
> I would test for em
First, if the error message is "should be in an empty directory", then why
is a empty 2nd argument part of that test? That should probably be a
separate test and separate error message.
I would test for empty directory like:
set files * .*
if test (count $files) != 0; echo error; end
And to tes
On Tue, 5 Mar 2019, Tassilo Horn wrote:
> in a script, I have this code:
>
> --8<---cut here---start->8---
> if test \( (count (ls -A .)) != "0" \) -a \( -z $argv[2] \)
> echo "This should be run in an empty directory."
> exit 3
> end
> --8<-
Hi all,
in a script, I have this code:
--8<---cut here---start->8---
if test \( (count (ls -A .)) != "0" \) -a \( -z $argv[2] \)
echo "This should be run in an empty directory."
exit 3
end
--8<---cut here---end--->8--