Skip to content

Commit

Permalink
Merge pull request #188 from mknos/ed-dash-filename
Browse files Browse the repository at this point in the history
ed refuses to open filename with a dash
  • Loading branch information
briandfoy committed Jul 7, 2023
2 parents 972b336 + 2230437 commit b137ede
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions bin/ed
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,12 @@ if ($opt_v) {
$EXTENDED_MESSAGES = 1;
}

print("@ARGV\n") if @ARGV;
&Usage if ($#ARGV > 1);

while ($_ = shift) {
if (/-/) {
$SupressCounts = 1;
} else {
$args[0] = $_;
}
&Usage if scalar(@ARGV) > 1;
my $fname = shift;
if ($fname eq '-') {
$SupressCounts = 1;
} else {
$args[0] = $fname;
}

if ($EXTENDED_MESSAGES) {
Expand Down

0 comments on commit b137ede

Please sign in to comment.