Command Not Found Handler
A Bash custom “command not found” hook
This script serves as an easy way of defining custom hooks for the hook function
that Bash calls whenever a command is not found, neither as an alias nor as
a function nor a command present in $PATH
.
Usage
Just place your hook files in ~/.config/cnfh
and add a line to include the
cnfh.sh
script in your ~/.bashrc
:
source /path/to/cnfh.sh
There are a few example hooks in the hooks/
directory.
View
repository
Notice that, even though the link URL redirects to a Git repository
hosting service, you can actually use it as the repo URL:
git clone
https://src.dot-eth0.sh/projects/cnfh