Better error messages for command not found (was Re: Pull in
upstream before 9.1 code freeze?)
Jonathan Anderson
jonathan.robert.anderson at gmail.com
Thu Jul 5 14:57:13 UTC 2012
On 5 Jul 2012, at 15:36, Wojciech Puchar wrote:
>> mwm at IPGhosterCrawlerI:~$ mmap
>> No command 'mmap' found, did you mean:
>> Command 'jmap' from package 'openjdk-6-jdk' (main)
>> Command 'jmap' from package 'openjdk-7-jdk' (universe)
>> Command 'gmap' from package 'gmap' (multiverse)
>> Command 'gmap' from package 'scotch' (universe)
>> Command 'tmap' from package 'emboss' (universe)
>> Command 'smap' from package 'slurm-llnl' (universe)
>> Command 'pmap' from package 'procps' (main)
>> Command 'moap' from package 'moap' (universe)
>> Command 'umap' from package 'libunicode-map8-perl' (main)
>> Command 'map' from package 'sgt-puzzles' (universe)
>> Command 'amap' from package 'amap-align' (universe)
>> mmap: command not found
>
> are you serious that linux distros have such a think now?
> I didn't use linux for a long time and no plan to use it, but you are joking isn't it?
They do, and it's actually very useful in two cases:
1. new users — "my friend told me to try out latex, but when I type 'latex' nothing happens! oh wait, that's how I make it work"
2. confusingly-named packages. on FreeBSD:
[nick ~]$ latex
zsh: command not found: latex
[nick ~]$ pkg search latex | awk '{print $1}'
latex-chapterfolder-2.0.20051124
latex-supertabular-1_3
ja-latex2html-2002.2.1j2.0_11
latex-beamer-3.07_4
latex-feynmf-1.08.19961202_7
pidgin-latex-1.0_5
latex-biblatex-0.9e
latex-pgf-2.10
latex-svninfo-0.7.4_3
latex-keystroke-1.0.20001109_5
latex-aastex-5.2_3
klatexformula-3.1.2_2
latex-nomencl-4.2.20050922
jlatexmath-0.9.7
latex-acm-1.1
latex-circ-1.0f_5
html2latex-0.9c
rtf2latex2e-1.0
latex-timing-1.0.19940515_6
latex-aa-6.1_3
latex-ucs-20041017_5
tomboy-plugin-latex-0.6
latex2e-2003.12_1
latex-etoolbox-2.0.a
db2latex-0.8p1_1
dblatex-0.3.2
latex2html-2008
latex2slides-1.0_5
platex-jsclasses-1.0.20110510
ja-platex-otf-1.2.4_6
ja-platex209-1.0_7
latex-mk-2.1_2
rtf2latex-1.5
latex-prettyref-3.0_4
latex-texpower-0.2_4
latex-arydshln-1.71.20040831_5
latex-logreq-1.0
cpp2latex-2.3
latex-biblist-1.4.19920113_5
platex-japanese-1.3_4
latex-caption-3.1.20100114_1
latex-auto-greek-1.0b_4
latexmk-431
latex-service-0.1_2
latex2rtf-2.0.0
latex-tipa-1.3_4
latex-mathabx-1.0.20050518_4
latex-logpap-0.6.20040201_5
htmltolatex-1_15
latex-bytefield-1.2.20050731_5
latex-resume-20010823_3
latexdiff-0.5_2
easylatex-0.080
csv2latex-0.18,1
latex-subfloat-2.14.20030821_5
latex-csquotes-5.0b
latex-ltablex-1.0_1
latex-cjk-4.8.2_5
Compare to bash on Ubuntu:
[jra40 at kent ~]$ latex
The program 'latex' is currently not installed. You can install it by typing:
sudo apt-get install texlive-latex-base
This kind of thing makes the system *very* discoverable for non-experts (even non-experts wrt a particular package). You don't need to check mailing lists or freshports or whatnot, you can just try stuff out, and when it doesn't work, the system sometimes helps you find the thing you're looking for. For some people (like me), "just try stuff out" is an excellent way to start playing / getting familiar with a new system; it makes it more likely that I will stick with that system.
The command line shouldn't have to be a scary place for new users.
Jon
--
Jonathan Anderson
jonathan at FreeBSD.org
http://freebsd.org/~jonathan/
More information about the freebsd-hackers
mailing list