From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8329 invoked by alias); 3 Aug 2010 13:39:13 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 15235 Received: (qmail 913 invoked from network); 3 Aug 2010 13:39:11 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at bewatermyfriend.org does not designate permitted sender hosts) From: Frank Terbeck To: Julien Nicoulaud Cc: zsh-users Subject: Re: Package auto-suggestion under Debian/Ubuntu ? In-Reply-To: (Julien Nicoulaud's message of "Tue, 3 Aug 2010 15:14:20 +0200") References: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Date: Tue, 03 Aug 2010 15:38:12 +0200 Message-ID: <87hbjbg6kb.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Df-Sender: 430444 Julien Nicoulaud wrote: > One small thing I like with Bash is that auto-suggests packages when you try > to use an unknown command, like this: > > $ eclipse > > The program 'eclipse' is currently not installed. You can install it by >> typing: > > sudo apt-get install eclipse-platform > > > In Zsh, I just get: > > % eclipse > > zsh: command not found: eclipse Ubuntu's global bashrc probably uses the command-not-found program provided by the command-not-found package. It uses bash's command_not_found_handle() function. See `/etc/bash.bashrc' for details. Zsh has a similar facility, which is the command_not_found_handler() function. See % man zshmisc | less -p "COMMAND EXECUTION" for details. Regards, Frank