| Paste number 10092: | which vi;which vim |
| Pasted by: | newmanbe |
| When: | 5 years, 1 week ago |
| Share: | Tweet this! | http://paste.lisp.org/+7SC |
| Channel: | #fink |
| Paste contents: |
zsh-% which vi
vi () {
LIMIT=$#
for ((i = 1; i <= $LIMIT; i++ )) do
eval file="\$$i"
if [[ -e $file && ! -O $file ]]
then
otherfile=1
else
fi
done
if [[ $otherfile = 1 ]]
then
echo -ne "\e]1; vi $@\a"
sudo vi "$@"
settab
else
echo -ne "\e]1; vi $@\a"
command vi "$@"
settab
fi
unset i
}
zsh-% which vim
vim () {
# undefined
builtin autoload -XU
}This paste has no annotations.