-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Hard to look for Halloween #1493
Comments
So I have proven, -f or not, some other factor not mentioned on the man page is at work behind the scenes/screens. |
What distro? And how the words file has been composed? For example on Fedora we use data from Moby Project (now available on archive.org only) and it's sorted by
This is copy & paste from Fedora words spec file, important is "--ignore-case --dictionary-order". |
It seems that "look Halloween /usr/share/dict/words" which returns nothing in my example is a bug. |
Debian.
You will need to post a script I can run that will print that information. |
Ref. https://bugs.launchpad.net/ubuntu/+source/util-linux/+bug/1971425 It works with an older version of "look" with the same database. Indicates that the "words" file is OK. |
look $(shuf /usr/share/dict/words|head -n1) You can try this one: for A in a b c d e f g h i j k l m n o p q r s t u v w x y z
do (for i in $(seq 1 100); do
look $(grep "^$A" /usr/share/dict/words|shuf|head -n1)|head -n1
done)|wc -l
done |
OK, I have tried "american-english" dictionaly from the Debian package. You're right that The way how to fix it is to sort the dictionary in a proper way, try |
|
Note, see also #284 |
It seems my dictionary is already "dictionary-order" sorted:
|
I'm not sure symbolic links play well with relative path on my debian, anyway I've put things back the way they were with:
Only those two suggestions with |
At least on Ubuntu 22.04 it works when I take the "look" program from Ubuntu 20.04. So it is not only the dictionary. It's maybe the combination. |
I haven't found a more minimal example.
Now you can even do:
|
Here a very small minimal example. It has been generated with a line such as:
Many such examples display the "unpredictible behavior" thing. cat dict_03 Output
sort -dc dict_03 no output look -d Halloween dict_03 output
look -df Halloween dict_03 no output head -n5 dict_03 > dict_04 look -df Halloween dict_04 output
cat dict_03 | python3 -c "import sys,urllib.parse;[sys.stdout.write(urllib.parse.quote_plus(line.rstrip('\n'))+'\n') for line in sys.stdin]" output
md5sum dict_03 <(cat dict_03 | python3 -c "import sys,urllib.parse;[sys.stdout.write(urllib.parse.quote_plus(line.rstrip('\n'))+'\n') for line in sys.stdin]" | python3 -c "import sys,urllib.parse;[sys.stdout.write(urllib.parse.unquote(line.rstrip('\n'))+'\n') for line in sys.stdin]") output
|
Minimal examples are getting really small:
|
Hi, you must have been using a different version of For the thing to work it must include additional constraint that I've earlier overlooked in debian bug #973471, specifically So the So with the minimal example: Not working:
Working:
So, to fix my debian I did: (as root)
Now:
So, as far as I'm concerned it is fixed: there were no bug on |
The above fixes the problem, which still exist on latest Ubuntu 22.04.2 LTS (which is kind of lame) |
Hard to look for Halloween. Look is scared to look for it.
Man page says
Well all I know is
The text was updated successfully, but these errors were encountered: