Subject: | |
From: | |
Reply To: | |
Date: | Sun, 22 Jul 2007 13:51:58 +1000 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
Hi,
I found a vi/vim problem with SL5 i386.
SL5 is using /bin/vi (the old vi which doesn't support colours). Looking at an
SL4.5 server, this has the vi aliased to vim:
[root@elephant profile.d]# which vi
alias vi='vim'
/usr/bin/vim
which is what I want for the colours.
These are aliased from the /etc/profile.d/vim.sh script when you login.
So for SL4.5:
# cat 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
# sh -x vim.sh
+ '[' -n '3.00.15(1)-release' -o -n '' -o -n '' ']'
+ alias vi
+ alias vi=vim
[root@elephant profile.d]#
runs through fine and works:
# which vi
alias vi='vim'
/usr/bin/vim
for SL5:
# sh -x ./vim.sh
+ '[' -n '3.1.17(1)-release' -o -n '' -o -n '' ']'
+ '[' -x /usr/bin/id ']'
++ /usr/bin/id -u
+ '[' 0 -le 100 ']'
+ return
./vim.sh: line 3: return: can only `return' from a function or sourced script
+ alias vi
+ alias vi=vim
has an error and doesn't work:
# which vi
/bin/vi
Should I raise a bugzilla for this for TUV?
Michael.
|
|
|