summaryrefslogtreecommitdiff
path: root/src/ls.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-07-04 17:35:47 +0000
committerJim Meyering <jim@meyering.net>1996-07-04 17:35:47 +0000
commite7342330e50a00242d3f68425a8709cc62ec4487 (patch)
tree8c9fa19118f5c348660199da93170ee29e2a551b /src/ls.c
parent3f868304cf98dd21172f696b3da6cf8b71b136d4 (diff)
downloadcoreutils-e7342330e50a00242d3f68425a8709cc62ec4487.tar.xz
Make `dir --version' and `vdir --version' print their names, not `ls'.
Reported by Ulrich Drepper.
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ls.c b/src/ls.c
index d10080280..55465bee5 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -661,7 +661,10 @@ main (int argc, char **argv)
if (show_version)
{
- printf ("ls - %s\n", PACKAGE_VERSION);
+ printf ("%s - %s\n",
+ (ls_mode == LS_LS ? "ls"
+ : (ls_mode == LS_MULTI_COL ? "dir" : "vdir")
+ PACKAGE_VERSION);
exit (0);
}