Exactly what you are looking for:
export COMMAND_NOT_FOUND_INSTALL_PROMPT=1
質問
Let's say I thought I had SVN installed. I run the command and I get the following output:
aoneill@aoneill-Laptop:~/Documents$ svn
The program 'svn' is currently not installed. You can install it by typing:
sudo apt-get install subversion
My question is: Can I change the output, or catch such a situation, to say something like the following, with a prompt at the end?
aoneill@aoneill-Laptop:~/Documents$ svn
The program 'svn' is currently not installed. You can install it by typing:
sudo apt-get install subversion
Install the package? [y/n]
Thank you! It would make package handling that much nicer!
解決
Exactly what you are looking for:
export COMMAND_NOT_FOUND_INSTALL_PROMPT=1