Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spell: variable name alias #838

Merged
merged 2 commits into from
Nov 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions bin/spell
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ use Getopt::Std qw(getopts);
use constant EX_SUCCESS => 0;
use constant EX_FAILURE => 1;

my $Program = basename($0);
use constant DICT_FILE => '/usr/dict/words';

my $dict_file = "/usr/dict/words"; # Filename (path) for standard dict
my $Program = basename($0);

my (
%words, # words from dictionary
Expand All @@ -47,9 +47,9 @@ getopts('cd:ixv', \%opt) or usage();
$check = 1 if $opt{'c'} || $opt{'x'};
$suff = 1 if $opt{'v'};
$inter = 1 if $opt{'i'};
$dict_file = $opt{'d'} if defined $opt{'d'};
@supp = ($dict_file);
for (0 .. $#ARGV) {
@supp = ( DICT_FILE );
@supp = ( $opt{'d'} ) if defined $opt{'d'};
for (reverse (0 .. $#ARGV)) {
if ($ARGV[$_] =~ m/\A\+./) {
push @supp, substr($ARGV[$_], 1);
splice @ARGV, $_, 1;
Expand Down
Loading