On 01/13/2011 08:03 AM, Jim Meyering wrote: > Philipp Thomas wrote: > >> * Jim Meyering (j...@meyering.net) [20110113 08:53]: >> >>>> * Add --suffix [suffix] to enable suffix killing (using >>>> SUFFIX as the 2nd arg will no longer work going forward) >> >> Using SUFFIX as the second argument IMO has to keep working as otherwise >> you'll break tons of scripts! > > What I think he meant is that we'll need a --suffix=SUFF > option to specify a suffix, since when in --filter mode, > each input will be treated as a file/dir name. > > Whereas, on the command line, we'll still accept only 1 or 2 args.
BSD basename accepts more than 2 args. basename arg1 arg2 arg3 - no suffix, and print out three lines That is, the suffix is available if either: you pass exactly two args, and -a is not used you pass the -s/--suffix option (well, the long option spelling of --suffix would be new to GNU, but makes sense). Likewise, BSD basename accepts -a (how about --all as the long option spelling) to override 2-argument becoming a suffix situation. -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature