Question

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!

Était-ce utile?

La solution

Exactly what you are looking for:

export COMMAND_NOT_FOUND_INSTALL_PROMPT=1
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top