* Package information for non-installed programs in ZSH
@ 2011-04-05 11:40 Oliver Keszöcze
2011-04-05 12:42 ` Sebastian Tramp
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Oliver Keszöcze @ 2011-04-05 11:40 UTC (permalink / raw)
To: zsh-users
Hello
Using BASH and Ubuntu I get messages such as
The program 'gcc' can be found in the following packages:
* gcc
* pentium-builder
Try: sudo apt-get install <selected package>
if I try to run stuff I do not have currently installed. If I try the
same using
ZSH I get
zsh: correct 'gcc' to '_gcc' [nyae]? n
zsh: command not found: gcc
Is there a way to get the BASH behaviour under ZSH? Is it a BASH feature
anyway (might be some Ubuntu stuff)?
Best Regards
Oliver
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Package information for non-installed programs in ZSH
2011-04-05 11:40 Package information for non-installed programs in ZSH Oliver Keszöcze
@ 2011-04-05 12:42 ` Sebastian Tramp
2011-04-05 12:43 ` Peter Stephenson
2011-04-06 3:03 ` Brandon Sandrowicz
2 siblings, 0 replies; 4+ messages in thread
From: Sebastian Tramp @ 2011-04-05 12:42 UTC (permalink / raw)
To: Oliver Keszöcze; +Cc: zsh-users
On Tue, Apr 05, 2011 at 01:40:16PM +0200, Oliver Keszöcze wrote:
> Using BASH and Ubuntu I get messages such as
>
> The program 'gcc' can be found in the following packages:
> * gcc
> * pentium-builder
> Try: sudo apt-get install <selected package>
>
> if I try to run stuff I do not have currently installed. If I try the same
> using
> ZSH I get
>
> zsh: correct 'gcc' to '_gcc' [nyae]? n
> zsh: command not found: gcc
>
> Is there a way to get the BASH behaviour under ZSH? Is it a BASH feature
> anyway (might be some Ubuntu stuff)?
you have to include
/etc/zsh_command_not_found
in your zshrc, which is part of the command-not-found package ...
best regards
Sebastian Tramp
--
Sebastian Tramp - Department of Computer Science; University of Leipzig
WebID: http://sebastian.tramp.name Tel. (Fax): +49 341 97 323-66 (-29)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Package information for non-installed programs in ZSH
2011-04-05 11:40 Package information for non-installed programs in ZSH Oliver Keszöcze
2011-04-05 12:42 ` Sebastian Tramp
@ 2011-04-05 12:43 ` Peter Stephenson
2011-04-06 3:03 ` Brandon Sandrowicz
2 siblings, 0 replies; 4+ messages in thread
From: Peter Stephenson @ 2011-04-05 12:43 UTC (permalink / raw)
To: zsh-users
On Tue, 5 Apr 2011 13:40:16 +0200
Oliver Keszöcze <keszocze@math.uni-bremen.de> wrote:
> Using BASH and Ubuntu I get messages such as
>
> The program 'gcc' can be found in the following packages:
> * gcc
> * pentium-builder
> Try: sudo apt-get install <selected package>
>
> if I try to run stuff I do not have currently installed.
It will be using a command-not-found handler. You can do this sort of
thing in recent versions of zsh if you find out what the back end is...
command_not_found_handler() {
print "Attempting to locate the command $1..."
# if you don't want to consider that the command has been handled...
return 1
}
% fumble
Attempting to locate the command fumble...
zsh: command not found: fumble
--
Peter Stephenson <pws@csr.com> Software Engineer
Tel: +44 (0)1223 692070 Cambridge Silicon Radio Limited
Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, UK
Member of the CSR plc group of companies. CSR plc registered in England and Wales, registered number 4187346, registered office Churchill House, Cambridge Business Park, Cowley Road, Cambridge, CB4 0WZ, United Kingdom
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Package information for non-installed programs in ZSH
2011-04-05 11:40 Package information for non-installed programs in ZSH Oliver Keszöcze
2011-04-05 12:42 ` Sebastian Tramp
2011-04-05 12:43 ` Peter Stephenson
@ 2011-04-06 3:03 ` Brandon Sandrowicz
2 siblings, 0 replies; 4+ messages in thread
From: Brandon Sandrowicz @ 2011-04-06 3:03 UTC (permalink / raw)
To: zsh-users
Look in the packages:
command-not-found
command-not-found-data
IIRC it was a Python script at one point in time.
--
Brandon
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-06 3:04 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-05 11:40 Package information for non-installed programs in ZSH Oliver Keszöcze
2011-04-05 12:42 ` Sebastian Tramp
2011-04-05 12:43 ` Peter Stephenson
2011-04-06 3:03 ` Brandon Sandrowicz
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).