Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

export -f problem



Mandrake has startup function that looks like:

mc ()
{
... define some suff ...
}

[[ $SHELL = "/bin/bash" ]] && export -f mc

If your login shell is bash and you call zsh you get:

[root@localhost root]# zsh
mc () {
        mkdir -p $HOME/.mc/tmp 2> /dev/null
        chmod 700 $HOME/.mc/tmp
        MC=$HOME/.mc/tmp/mc-$$
        /usr/bin/mc -P "$@" > "$MC"
        cd "`cat $MC`"
        rm -i -f "$MC"
        unset MC
}

because export -f mc just prints out mc() code.

While the condition above is wrong (it should test for BASH_VERSION) - should we either make zsh set SHELL or be more compatible with export -f?

-andrej



Messages sorted by: Reverse Date, Date, Thread, Author