[svlug] Fw: Ubuntu 7.10 Beta released
Akkana Peck
akkana at shallowsky.com
Sat Sep 29 11:52:05 PDT 2007
Kristian Erik Hermansen writes:
> I have been running Gutsy for about 4-5 months now. One thing you
> will notice that is a new feature in Gutsy, and not mentioned in this
> thread, is that when you type an incorrect command in the shell, you
> will be told the proper package to install. Good for n00bs *AND*
> seasoned professionals :-)
Cool feature, but I see it in Feisty, so it's not new for Gutsy.
It's neat the way it's implemented: all they have to do in bash
(it's shell-specific -- doesn't work on tcsh) is define a function
called command_not_found_handle. So (at least in feisty) they
define that function to call /usr/bin/command-not-found, which calls
a python module they've written to look up the desired command in a
database. command_not_found_handle() is a useful little bash trick
I hadn't seen before.
--
...Akkana
"Beginning GIMP: From Novice to Professional": http://gimpbook.com
More information about the svlug
mailing list