LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Linux Keywords (https://www.linuxquestions.org/questions/linux-newbie-8/linux-keywords-65313/)

Westdog976 06-12-2003 10:32 PM

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)

Azmeen 06-12-2003 10:40 PM

vi ~/.bashrc
alias qmake='/path/to/qmake'
:wq!

Westdog976 06-12-2003 10:45 PM

thanks...

the alias worked just fine but what are the other two lines for? i didn't use them...

Azmeen 06-13-2003 02:09 AM

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 :)

Westdog976 06-13-2003 03:00 AM

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.