coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: rename: move command from util-linux to coreutils


From: Jim Meyering
Subject: Re: rename: move command from util-linux to coreutils
Date: Sun, 10 Jun 2012 22:36:00 +0200

Sami Kerola wrote:
> The next coreutils and util-linux releases are going to be made close
> to each others to avoid 'su' coming from multiple source, or being
> missing.  At same go moving 'rename' could make sense.
>
> I completely rewrote the command as the util-linux way doing things
> would not be a strong match how code is crafted in coreutils.  Primary
> difference is, as well known, usage of gnulib and a little bit
> different coding style.
>
> Please find my proposal how the new rename might be implemented.  I am
> almost sure the merge should not happen as is, as there are some cases
> which might not work correctly; for example directories are not
> renamed, nor files moved out of directories.  Perhaps that is right, or
> wrong.  Comments are definitely welcome.
>
> Another decision which might be wrong is stdin file list handling.
> Command, by default, expects null terminated strings and nothing else
> will work.  One might argue the command should, as xargs, allow white
> space terminated input.  IMHO allowing white space termination
> encourages users to use error prone input style, and therefore it is
> not justified to be default nor supported in modern commands.  But I
> could overlook something, so maybe this needs to be discussed as well.
>
> Finally, without any doubt I wrote half of English somehow wrong so human
> language review is highly recommendable.

Thanks for the suggestion.
Have you already discussed this on the util-linux list and/or
with Karel Zak?

Here's some quick feedback after a very cursory look:
I see unchecked syscalls, from write and waitpid to close and dup2.

Style nits: I saw "TYPE * var_name" in at least one declaration.
I think it was a parameter list.
It should be "TYPE *var_name".

I also saw a TAB or two used in indentation.  Use only spaces.
If you run "make syntax-check", it will show you where.

Providing more test coverage would be most useful/welcome.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]