[Bug 1971425] Re: The "look" cli dictionary only sees capitalized words
Heinrich Schuchardt
1971425 at bugs.launchpad.net
Fri Nov 25 16:59:30 UTC 2022
The same behavior can be seen in Ubuntu 23.04.
The look command requires a sorted file.
If no argument is given /usr/share/dict/words is used as default file and the f flag is set.
/usr/share/dict/words is sorted with upper case preceding lower case.
But when the f flag is set a sort ignoring case is assumed.
So the command look works as documented.
It is simply that the sort sequence of /usr/share/dict/words does not
match what look needs.
You can create your own wordlist, sort it to your needs, and point
environment variable WORDLIST to it.
$ cat /usr/share/dict/american-english | sort > foo
$ WORDLIST=foo look accicent
accident
accidental
accidentally
accidental's
accidentals
accident's
accidents
I would suggest not to change anything in util-linux.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to util-linux in Ubuntu.
https://bugs.launchpad.net/bugs/1971425
Title:
The "look" cli dictionary only sees capitalized words
Status in util-linux package in Ubuntu:
Confirmed
Bug description:
In Ubuntu 20.04;
~ > look accident
accident
accident's
accidental
accidental's
accidentally
accidentals
accidents
In Ubuntu 22.04;
~ > look accident
(nothing)
~ > look acc
Accenture
Accenture's
Accra
Accra's
Digging deeper; the dictionary at /usr/share/dict/words seems OK.
If I copy the "look" binary from Ubuntu 20.04 and use it on Ubuntu 22.04 it works;
~ > ./look accident
accident
accidental
accidentally
accidental's
accidentals
accident's
accidents
ProblemType: Bug
DistroRelease: Ubuntu 22.04
Package: bsdextrautils 2.37.2-4ubuntu3
ProcVersionSignature: Ubuntu 5.15.0-27.28-generic 5.15.30
Uname: Linux 5.15.0-27-generic x86_64
ApportVersion: 2.20.11-0ubuntu82
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: XFCE
Date: Tue May 3 14:19:57 2022
InstallationDate: Installed on 2018-09-07 (1334 days ago)
InstallationMedia: Ubuntu 18.04.1 LTS "Bionic Beaver" - Release amd64 (20180725)
SourcePackage: util-linux
UpgradeStatus: Upgraded to jammy on 2022-05-01 (2 days ago)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1971425/+subscriptions
More information about the foundations-bugs
mailing list