So sprach James, Rick am Sat, Mar 10, 2001 at 11:35:14AM -0600:
> Hello Cookers,
> 
>   Please forgive me if this is a newbie question but I know I'll get
> the right answer here.  I want to add a few lines to .bashrc that go
> something like this:
> 
> if [ current display=X11 ]; then
>     alias vi='gvim'
> fi
> 
> What's the correct syntax for inside the brackets?

if [ "x$DISPLAY" != "x" ]; then
        alias vi=gvim
fi

DISPLAY will only be set if you're in X.

Alexander Skwar
-- 
How to quote:   http://learn.to/quote (german) http://quote.6x.to (english)
Homepage:       http://www.digitalprojects.com   |   http://www.iso-top.de
   iso-top.de - Die guenstige Art an Linux Distributionen zu kommen
                Uptime: 6 days 17 hours 56 minutes

Reply via email to