[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-bash] How bash is hijacked to prompt useful help when the command
From: |
Peng Yu |
Subject: |
[Help-bash] How bash is hijacked to prompt useful help when the command is not found? |
Date: |
Sat, 31 Mar 2012 03:58:57 -0500 |
Hi,
On mac, when I type an unknown command (in bash), it just shows an error.
~$ xxx
-bash: xxx: command not found
But on ubuntu, it can prompt something more useful (above "xxx:
command not found").
~$ xxx
No command 'xxx' found, did you mean:
Command 'xdx' from package 'xdx' (universe)
Command 'x2x' from package 'x2x' (universe)
Command 'xx' from package 'fex-utils' (universe)
Command 'xxd' from package 'vim-common' (main)
xxx: command not found
If I try the same thing in ksh in ubuntu, it clearly shows that the
prompt is different. So the conclusion is that somehow bash is hijack
in ubuntu to print more helpful statements. Does anybody know how this
is done?
~$ ksh
$ xxx
ksh: xxx: not found [No such file or directory]
--
Regards,
Peng
- [Help-bash] How bash is hijacked to prompt useful help when the command is not found?,
Peng Yu <=