Paste number 10092: which vi;which vim

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:
Raw Source | XML | Display As
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.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.