Hmm - making basename (and also dirname) a filter is compatible
   with POSIX: since POSIX requires a single argument, we can define
   operation with a missing argument however we want (or in other
   words, our current definition of issuing an error is not mandated).
   If we do that, then we would also need to add something like xargs'
   -0 option, so that you could filter on NUL terminated (rather than
   whitespace-terminated) strings for safety when operating on
   arbitrary file names.

You won't be able to specify the suffix to remove if it is going to
behave like a filter, unless you add a option for that.

$ echo foo.h | basename --suffix=.h
foo
$


_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to