Better error messages for command not found (was Re: Pull in upstream before 9.1 code freeze?)

Mike Meyer mwm at mired.org
Thu Jul 5 17:21:56 UTC 2012


On Thu, 5 Jul 2012 15:57:09 +0100
Jonathan Anderson <jonathan.robert.anderson at gmail.com> wrote:
> 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

[long list elided]

> 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

Nobody has argued that making the ports collection easier to search
would be a bad idea. I get:

bhuda% portsearch -f 'bin/latex$'
Port:	latex2e-2003.12_1
Info:	TeX macro package
Path:	/usr/ports/print/latex
Files:	bin/latex

Port:	teTeX-base-3.0_20
Info:	Thomas Esser's distribution of TeX & friends (binaries)
Path:	/usr/ports/print/teTeX-base
Files:	bin/latex

2 ports, 2 files
bhuda% 

Hmm. Seems like we have two different versions of latex in the ports
- and probably packages - tree.

In fact, if you want this functionality in the base, providing the
search functionality as an external tool is a crucial step. I'd be
surprised if anybody object to that being added to base.

> The command line shouldn't have to be a scary place for new users.

Nor should it be an annoying place for old users. New users are
important. But old users are the ones who make contributions.

	   <mike
-- 
Mike Meyer <mwm at mired.org>		http://www.mired.org/
Independent Software developer/SCM consultant, email for more information.

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org


More information about the freebsd-hackers mailing list