Skip to content

Commit

Permalink
ls: add --version
Browse files Browse the repository at this point in the history
* Now users can inspect installed without having to read source
* Based on a recent patch to bin/cat
  • Loading branch information
mknos committed Jun 18, 2024
1 parent 525a48c commit 05a4d44
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bin/ls
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ my $Now = time; # time we were invoked
my %Options = (); # option/flag arguments
my $SixMonths = # long listing time if < 6 months, else year
60*60*24*(365/2);
my $VERSION = '0.70'; # because we're V7-compatible :)
our $VERSION = '0.70'; # because we're V7-compatible :)
my $WinCols; # window columns of output

# ------ compensate for lack of getpwuid/getgrgid on some platforms
Expand All @@ -137,6 +137,10 @@ if ($@) {
}

# ------ functions
sub VERSION_MESSAGE {
print "$Program version $VERSION\n";
exit EX_SUCCESS;
}

# ------ get directory entries
sub DirEntries {
Expand Down

0 comments on commit 05a4d44

Please sign in to comment.