__/ [ Flamingo ] on Tuesday 12 September 2006 09:27 \__
> Hi Gurus,
>
> I'm not so good at linux. Now a problem puzzles me, my lovely eclipse
> installed at my home directory(installed by somebody else), everytime
> I have to do something like this:
>
> $ cd /home/wx/eclipse
> $ ./eclipse
>
> then I can start eclipse.
>
> How I can directly use "eclipse" at any directory, not limited in
> /home/wx/eclipse. Is it about how to set global envirment?
>
> thanks for kind reply. any help is appreciated!
alias eclipse='/home/wx/eclipse/eclipse'
Add this to your startup scripts, e.g. .bashrc. This depends on the shell and
the distribution. In my case:
,----[ ~/.bashrc ]
| test -s /home/roy/Main/Programs/Scripts/Definitions/bashrc
| && . /home/roy/Main/Programs/Scripts/Definitions/bashrc
| [[ -f "/home/roy/.config/autopackage/paths-bash" ]] && .
| "/home/roy/.config/autopackage/paths-bash"
`----
/home/roy/Main/Programs/Scripts/Definitions/bashrc contains:
,----[ Contents ]
| echo Setting up aliases...
| echo
|
| . /home/roy/Main/Programs/Scripts/aliases.sh
`----
home/roy/Main/Programs/Scripts/aliases contains
,----[ Contents ]
| #!/bin/bash
|
| alias dir='ls -la --color=always'
| alias dir/p='ls -la --color=always |more'
| alias dir/w='ls --color=always -X'
| ...
`----
It can be made simpler by just including the last bits in .bashrc, but then
it's more prone to breakage.
Hope it helps,
Roy
--
Roy S. Schestowitz
http://Schestowitz.com | GNU/Linux ¦ PGP-Key: 0x74572E8E
Mem: 514480k total, 469880k used, 44600k free, 7404k buffers
http://iuron.com - next generation of search paradigms
|
|