On most GNU/Linux systems, when a command is not found, a message showing what can be run to install the command is printed. However, macOS does not have this.
This program adds a similar function for macOS (only for macOS, as of now). Instead of simply printing the command, Tii also offers to run it for you.
The name Tii is an acronym for “Then Install It”, which is what you will probably say when shown “Command not found”.
As of now, only macOS is supported
brew install quackduck/tap/tii
Tii will be automatically triggered if a command is not found and so you usually do not need to directly interact with it.
The Tii binary has the following usage:
Usage: tii [--help/-h | --version/-v | ] Examples: tii fish tii cowsay tii --help
These are the environment variables that can affect Tii:
TII_DISABLE_INTERACTIVEis set to “true”, Tii will disable interactive output (prompting for confirmation) and not install any packages.
TII_AUTO_INSTALL_EXACT_MATCHESis set to “true”, Tii will automatically install exact matches without prompting for confirmation. This variable overrides
If you have issues with Tii, head over to issues.
You can uninstall with:
brew uninstall tii
Here’s a list of all the files Tii uses:
/usr/local/bin/tii /usr/local/share/fish/vendor_functions.d/tii_on_command_not_found.fish /etc/profile.d/tii_on_command_not_found.sh
Any other business
Have a question, idea or just want to share something? Head over to Discussions