]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
* src/rm.c: Include "dirname.h".
authorJim Meyering <jim@meyering.net>
Sat, 26 Jul 2003 09:02:54 +0000 (09:02 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 26 Jul 2003 09:02:54 +0000 (09:02 +0000)
(usage): Use base_name (program_name) in body of --help output.
This lets me...
* man/Makefile.am (.x.1): ...back out the kludge of 2003-07-22.

src/rm.c

index 4779f2e3c494e95c2dbd4b44eb39f492c7a579f1..a2be56d451ba0b31e873438ac4042d9d865a7519 100644 (file)
--- a/src/rm.c
+++ b/src/rm.c
@@ -49,6 +49,7 @@
 #include <assert.h>
 
 #include "system.h"
+#include "dirname.h"
 #include "error.h"
 #include "remove.h"
 #include "save-cwd.h"
@@ -96,6 +97,7 @@ usage (int status)
             program_name);
   else
     {
+      char *base = base_name (program_name);
       printf (_("Usage: %s [OPTION]... FILE...\n"), program_name);
       fputs (_("\
 Remove (unlink) the FILE(s).\n\
@@ -118,7 +120,7 @@ use one of these commands:\n\
 \n\
   %s ./-foo\n\
 "),
-             program_name, program_name);
+             base, base);
       fputs (_("\
 \n\
 Note that if you use rm to remove a file, it is usually possible to recover\n\