From owner-freebsd-hackers@FreeBSD.ORG Thu Jul 5 01:42:23 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 858A4106566B for ; Thu, 5 Jul 2012 01:42:23 +0000 (UTC) (envelope-from mwm@mired.org) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id 2302C8FC0A for ; Thu, 5 Jul 2012 01:42:22 +0000 (UTC) Received: by qcsg15 with SMTP id g15so5187455qcs.13 for ; Wed, 04 Jul 2012 18:42:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:to:subject:message-id:in-reply-to:references:organization :x-mailer:face:mime-version:content-type:content-transfer-encoding :x-gm-message-state; bh=TXf5BlUKJuZ7UACHnhT5pPnsIPCvhbGSf6cEiLmeG0o=; b=dR1Lrq+gr2Vh4RLCDCAnlvC2LkdrxSmRFkdS8kpm1E3c7yhl+X7Z/t7fWr5IAkhYZV IWM2paOzHJDcxUdJDKw1fV9W5K0QW0Pf7OU4M8BScQMGnn2uAumOD2VKcU9t8X+y363B Zxzsga0DT1NW3zQ8SRI9mgw5v1vJNo1hJls6PPSGCmi+9nZVesFDXOrzkEJDd/vULhXX B88ASyz3rXRi/z14/wT3gGdxj9EdGuPCeZBibU3YSxwsFjUmwAxUChd87RzZuCVMJ+nb sdJvh7W1pes3sm1mSZ056BzLvinrz4x42LqD+b8wPxWXsBR9f9fkqs06gPQt3HvgC0ZQ 6h6Q== Received: by 10.224.205.195 with SMTP id fr3mr4827401qab.68.1341452542261; Wed, 04 Jul 2012 18:42:22 -0700 (PDT) Received: from bhuda.mired.org (74-140-201-117.dhcp.insightbb.com. [74.140.201.117]) by mx.google.com with ESMTPS id dy2sm17306800qab.11.2012.07.04.18.42.21 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 04 Jul 2012 18:42:22 -0700 (PDT) Date: Wed, 4 Jul 2012 21:42:16 -0400 From: Mike Meyer To: Message-ID: <20120704214216.29085927@bhuda.mired.org> In-Reply-To: <2EA305F0-87D9-47BE-B3E6-366659BF77AF@kientzle.com> References: <86bojxow6x.fsf@ds4.des.no> <4FF35864.5030109@FreeBSD.org> <20120704185104.GA42355@DataIX.net> <4FF4B36A.2040608@FreeBSD.org> <20120704180134.7c649e1b@bhuda.mired.org> <4FF4BEED.10103@FreeBSD.org> <20120704225519.GB19945@DataIX.net> <4FF4CAD1.8080804@FreeBSD.org> <20120704234104.GA392@DataIX.net> <8E9DECBB-3D1E-4129-A958-9DB0DF69ECC3@kientzle.com> <4FF4E105.50502@FreeBSD.org> <20120704203711.2732b645@bhuda.mired.org> <2EA305F0-87D9-47BE-B3E6-366659BF77AF@kientzle.com> Organization: Meyer Consulting X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.6; amd64-portbld-freebsd8.3) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAG1BMVEXguIzRkGnhyaz069mXhW0WHRnbrnR9WCQ6LB0CchNMAAACSUlEQVQ4jV2TQW7jMAxFGaPQOgQEdZaGMsgBrAvUA03dCxj1Uu4U2gfwQD7AGNax51NK07RcxXz6/CSl0Ij450vkPG1jzpIZM1UwDCl/xB14TWnNX8A00Qj5a0mnVFVbVUz4MeErea2HikSRqZzY894zwg9p2+/AtO8LzxFED+tNAUFeU29iFOLRxlZAcdo9A8wi8ZBMV4BKPde82Oxrvs6BTkulQIClte0DLFzzsKk9j1MBex8iUaP00Bd78S/muyFScrTXz6zLkEUxJp+SabQfNOs4f4Jpx5qSZ/304PWwlEWP1cOn/mJQR7EOD+uKhjcBLziuL7xoY5Xm+VFAUSw/LwwwsHEHxihpwV4EJH0xXRkbw1PkRw+X4pEuSJwBggqk+HEYKkiL5/74/nQkogigzQsAFrakxZyfw3wMIEEZPv4AWMfxwqE5GNxGaERjmH+PG8AE0L4/w9g0lsp1raLYAN5azQa+AOoO9NwcpFkTrG2VKNMNEL5UKUUAw34tha0z7onUG0oBoNtczE04GwFE3wCHc0ChezAJ6A1WMV81AtY7wDAJSlXwV+4cwBvsOsrQMRawfQEBz0deEZ7WNpV2szckIKo5VpDHDSDvF1GItwqqAlG01Hh50BGtVhuUkjkasg/14bYFGCgWg1fSWHvmOoJck2xdp9ZvZBHzDVTzX23TkrOn7qe5U2COEw5D4Vx3qEQpFY2Z/3QFnJxzp7YCmSMG19nOUoe869zZfOQb5ywQuWu0yCn5+8gxZz+BE7vG3j4/wbf4D/sXN9Wug1s7AAAAAElFTkSuQmCC Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQlzKUMJYUEBRfixmXXdUfvQyk2JT+sRAYstibVDZjdNxFJjXI0YiTqynCY+/2sFMcHC6tLZ Subject: Re: Better error messages for command not found (was Re: Pull in upstream before 9.1 code freeze?) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2012 01:42:23 -0000 On Wed, 4 Jul 2012 18:03:05 -0700 Tim Kientzle wrote: > I'm curious whether the earlier objections were due to > misunderstandings about auto-install. Auto-install would > be problematic, but the feature being discussed here does not > require installation. Just better error messages. My objection was not due to misunderstanding about auto-install. I find the feature annoying - spewing a bunch of crap at me because of a typo. It annoys me far more often than it actually helps me, because more often than not the "missing command" is a typo, *not* an attempt to run a command I don't have. I.e., if I type mmap instead of nmap, I get: mwm@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 That said, this seems to require modification to the ports system to generate a database for it. And having a command in the base system that I can feed a command (or better yet, file - I need libraries almost as often as I need commands) name to and it tells me what package/port to install would be useful. Again, I hope a FreeBSD implementation would be a bit more constrained, and *not* list "similar" commands. bash and zsh already have command_not_found handlers. I don't really object to that functionality to sh and tcsh. Just *don't turn it on by default*. I don't think I'd even object to setting those handlers in /usr/share/skel. Of course, I might turn around and ask that we add support for command correction ala zsh to sh & tcsh via those hooks if they get added. http://www.mired.org/ Independent Software developer/SCM consultant, email for more information. O< ascii ribbon campaign - stop html mail - www.asciiribbon.org