reopen 606178
thanks

On 04/01/2013 02:19 AM, Craig Small wrote:
The /dir is the first non-option so everything past it is a name to be
looked at.

Thank you for confirming the current behavior, but five problems remain:

1. That’s inconsistent with how GNU getopt works. GNU getopt treats any argument beginning with - as an option, even after positional arguments, unless -- has been used. (I see that fuser doesn’t actually use GNU getopt, but that’s not a good reason to be inconsistent with it.)

2. That’s inconsistent with other options.
  $ fuser -i -k /tmp/test
  /tmp/test:           25825
  Kill process 25825 ? (y/N) n
  $ fuser -k /tmp/test -i
  /tmp/test:           25825
  Kill process 25825 ? (y/N) n

3. That’s inconsistent with the error messages:
  $ fuser /missing /alsomissing
  Specified filename /missing does not exist.
  Specified filename /alsomissing does not exist.
  $ fuser /missing -m
  Specified filename /missing does not exist.
(There’s no error message about ‘-m’ not existing.)

4. That’s inconsistent with the manpage:
   -m NAME, --mount NAME
          NAME specifies a file on a mounted file system or a block
          device that is mounted.   […]
(NAME is documented as an argument to -m, not a positional argument.)

5. That’s confusing and dangerous. It shouldn’t be possible for an option intended as a safety feature to silently have no effect just because it was specified in the wrong order on the command line.

Anders


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to