unset global editor symlink

Bob Metelsky bob.metelsky at gmail.com
Wed Nov 17 15:43:31 UTC 2004


Ive commented /ths area of /etc/profile - so it souldnt act on profile.d*

#for i in /etc/profile.d/*.sh ; do
#    if [ -r "$i" ]; then
#       . $i
#    fi
# done

also here is a file list in /etc/profile.d
Ive altered the vim to .bob files

[root at RH1 profile.d]# ls -a
.            glib2.csh              krb5.csh  less.csh     which-2.sh
..           glib2.sh               krb5.sh   less.sh
colorls.csh  gnome-ssh-askpass.csh  lang.csh  vim-csh.bob
colorls.sh   gnome-ssh-askpass.sh   lang.sh   vim-sh.bob

Still the same behaviour

Im at a loss
TIA
bob


On Wed, 17 Nov 2004 09:56:03 -0500, Bob Metelsky <bob.metelsky at gmail.com> wrote:
> Ive commented /ths area of /etc/profile - so it souldne act on profile.d*
> 
> #for i in /etc/profile.d/*.sh ; do
> #    if [ -r "$i" ]; then
> #       . $i
> #    fi
> # done
> 
> also here is a file list in /etc/profile.d
> 
> [root at RH1 profile.d]# ls -a
> .            glib2.csh              krb5.csh  less.csh     which-2.sh
> ..           glib2.sh               krb5.sh   less.sh
> colorls.csh  gnome-ssh-askpass.csh  lang.csh  vim-csh.bob
> colorls.sh   gnome-ssh-askpass.sh   lang.sh   vim-sh.bob
> 
> Still the same behaviour
> 
> Im at a loss
> TIA
> bob
> 
> 
> 
> 
> On Wed, 17 Nov 2004 16:19:52 +0200, Karasik, Vitaly <vkarasik at nds.com> wrote:
> > the answer is : in /etc/profile and /etc/profiles.d/*
> >
> > So there are at least 2 ways to "unalias" vi :
> >
> > 1) delete vim* from /etc/profile.d - I tried and it works!
> >
> > 2) comment all lines in  /etc/profile.d/vim.sh
> >
> > rename vim.sh to blah-blah.sh and leaving script in the same dir won't work - profile script runs *.sh scripts.,=
> >
> > Rgds,
> > Vitaly
> >
> >
> >
> > > -----Original Message-----
> > > From: redhat-list-bounces at redhat.com
> > > [mailto:redhat-list-bounces at redhat.com]On Behalf Of Bob Metelsky
> > > Sent: Wed, November 17, 2004 4:04 PM
> > > To: General Red Hat Linux discussion list
> > > Subject: Re: unset global editor symlink
> > >
> > >
> > > Here is the output of alias.  Ive poked around in  /etc/profile and
> > > profile.d to no avail
> > >
> > > alias cp='cp -i'
> > > alias l.='ls -d .* --color=tty'
> > > alias ll='ls -l --color=tty'
> > > alias ls='ls --color=tty'
> > > alias mv='mv -i'
> > > alias rm='rm -i'
> > > alias vi='vim'
> > > alias which='alias | /usr/bin/which --tty-only --read-alias
> > > --show-dot
> > > --show-tilde'
> > >
> > > This was in vim.sh
> > > #if [ -n "$BASH_VERSION" -o -n "$KSH_VERSION" -o -n
> > > "$ZSH_VERSION" ]; then
> > > # for bash, pdksh and zsh, only if no alias is already set
> > > # alias vi >/dev/null 2>&1 || alias vi=vim
> > > # fi
> > > #unalias vi
> > >
> > > Ive commented the file and it still calls vim
> > > Even if I rename vim.sh  -  vim gets called up.
> > >
> > > I'd like to know where the system wide aliases are set ;-)
> > >
> > > TIA
> > >  bob
> > >
> > >
> > > "Oracle error messages being what they are, do not
> > > highlight the correct cause of fault, but will identify
> > > some other error located close to where the real fault lies."
> > >
> > >
> > >
> > > C. Linus Hicks wrote:
> > >
> > > >On Tue, 2004-11-16 at 23:32 -0500, Bob Metelsky wrote:
> > > >
> > > >
> > > >>Greetings - When I first installed RH  I had vi as the
> > > default editor .
> > > >>I then installed other editors and somehow vim got symlinked to vi.
> > > >>
> > > >>I dont mind using vim over vi, I just would like to be able
> > > to change it
> > > >>if needed.
> > > >>
> > > >>which vi
> > > >>alias vi='vim'
> > > >>    /usr/bin/vim
> > > >>
> > > >>vi actually resides in /bin/vi and If I call with the full path vim
> > > >>still gets called
> > > >>
> > > >>which vim
> > > >>/usr/bin/vim
> > > >>
> > > >>I dont know where this alias is set.  Ive tried to reset it in my
> > > >>.profile alias vi='/bin/vi'
> > > >>This still calls vim
> > > >>
> > > >>This seems to be set as a global alias or symlink. I want
> > > to define MY
> > > >>editor!  ;-)
> > > >>
> > > >>
> > > >
> > > >Use the alias command without arguments to show all currently defined
> > > >aliases. Using full path to an executable is full path, a
> > > common way to
> > > >avoid invoking an alias.
> > > >
> > > >So, what do you get when you do:
> > > >
> > > >ls -l /bin/vi
> > > >
> > > >On my system, that shows:
> > > >
> > > >-rwxr-xr-x  1 root root 572392 Oct 19 15:37 /bin/vi
> > > >
> > > >Which is clearly a different file from:
> > > >
> > > >ls -l /usr/bin/vim
> > > >
> > > >-rwxr-xr-x  1 root root 1405896 Oct 19 15:37 /usr/bin/vim
> > > >
> > > >You might try this:
> > > >
> > > >rpm -qf /bin/vi
> > > >rpm -qf /usr/bin/vim
> > > >
> > > >And see what you get.
> > > >
> > > >
> > > >
> > > --
> > > redhat-list mailing list
> > > unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> > > https://www.redhat.com/mailman/listinfo/redhat-list
> > >
> > ***********************************************************************************
> > Information contained in this email message is intended only for use of the individual or entity named above. If the reader of this message is not the intended recipient, or the employee or agent responsible to deliver it to the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify the postmaster at nds.com and destroy the original message.
> > ***********************************************************************************
> >
> >
> >
> > --
> > redhat-list mailing list
> > unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> > https://www.redhat.com/mailman/listinfo/redhat-list
> >
> 
> 
> --
> Bob Metelsky
> 
> 
> 
> "Oracle error messages being what they are, do not
> highlight the correct cause of fault, but will identify
> some other error located close to where the real fault lies."
> 


-- 
Bob Metelsky

"Oracle error messages being what they are, do not 
highlight the correct cause of fault, but will identify 
some other error located close to where the real fault lies."




More information about the redhat-list mailing list