On 03/10/2012 11:13 AM, Jérémy Compostella wrote:

> BTW, reviewing your changes I discovered that when a user specifies a
> suffix length zero the old behavior was to use the default length of 2
> and the new is, of course, the suffix auto length way.

Well spotted. I noticed that too, but thought 0 = auto (default) was ok.

> However, IMHO,
> it's dangerous to not raise an error. If a user for example make a
> script which use split with a shell variable for the suffix_length
> option it could have the feeling that his script works fine although it
> provides a suffix length zero.

Though if there was an existing script as follows we'd break it.

sl=0 #default
[ "$some_condition" ] && sl=5
split -a $sl ...

> I attached an independent patch since there is no semantic relationship
> with the current one. Feel free to merge, review or refuse it.

I'm inclined to think this is fine as is.

cheers,
Pádraig.

Reply via email to