Linux Keywords
How do I register a keyword for a program?
I have a program called qmake and I need it to make project files but typing its whole path out is really annoying. Instead of having to be in the qmake directory, I would just like to be able to type qmake (while in any directory) to run the program. An example of a Linux keyword, if you don't understand what I mean, is ksnapshot, which will run the KSnapShot screenshot program or konqueror, which will run Konqueror (some other keywords are kwrite, kmail, you get the idea... i hope) |
vi ~/.bashrc
alias qmake='/path/to/qmake' :wq! |
thanks...
the alias worked just fine but what are the other two lines for? i didn't use them... |
vi is a text editor in linux.
:wq! is the command for write the file and then quit in vi The reason I wrote them is that if you use alias on the prompt, you will lose it after your next reboot. So, to make it permanent, it's recommended that you write it in a file called .bashrc in your home dir (if it doesn't exist, then create it). The .bashrc file is parsed everytime you log on. Hope this helps :) |
Thanks for the info... I was wondering why the keyword wasn't working when I logged back in... :D
|
All times are GMT -5. The time now is 03:07 PM. |