From: Jim Meyering Date: Thu, 4 Jul 1996 17:35:47 +0000 (+0000) Subject: Make `dir --version' and `vdir --version' print their names, not `ls'. X-Git-Tag: TEXTUTILS-1_18c~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e7342330e50a00242d3f68425a8709cc62ec4487;p=thirdparty%2Fcoreutils.git Make `dir --version' and `vdir --version' print their names, not `ls'. Reported by Ulrich Drepper. --- diff --git a/src/ls.c b/src/ls.c index d100802804..55465bee58 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); }