vim/vim.csh
DistroBaker e6b2f6c0ee Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/vim.git#86943b30a6c1912a1d4a5c8ae867ee7b15d456c1
2020-12-16 14:22:16 +00:00

21 lines
538 B
Tcsh

# we need to use which twice - first for checking if
# the command doesn't fail, the use it if doesn't fail
set vim_cond = `command -v vim`
set vi_cond = `command -v vi`
switch ( $vim_cond-$vi_cond )
case /usr/bin/vim-/usr/bin/vi:
# apply only when founded vim and vi are in expected dirs from distro
alias vi vim
alias view 'vim -R'
breaksw
case -/usr/bin/vi:
# apply only if founded vi is in expected dir from distro
alias vim vi
breaksw
endsw
# just in case
unset vim_cond
unset vi_cond