De acordo com uma dica em problemas de instalação com cores, o plug-in de compinit e git # 4757 , parece que verificar o " $ FPATH variable content " contém o caminho correto para onde você instalou as funções deve ajudar a resolver o problema.
Além disso, copiar o conteúdo do zsh para um local como a raiz ou um caminho já definido em $FPath
pode ajudar a resolver esse problema também.
The first thing to do is verify your FPATH variable content: echo $FPATH. In a normal situation return something like that:
/home/charmander/.oh-my-zsh/plugins/git:/home/charmander/.oh-my-zsh/functions:/home/charmander/.oh-my-zsh/completions:/home/charmander/.oh-my-zsh/plugins/python:/home/charmander/.oh-my-zsh/plugins/pip:/home/charmander/.oh-my-zsh/plugins/git:/home/charmander/.oh-my-zsh/functions:/home/charmander/.oh-my-zsh/completions:/usr/share/zsh/site-functions:/usr/share/zsh/5.0.2/functions
.In my case it returned:
/opt/intel/composer_xe_2011_sp1.7.256/mkl/include
. When I try to remove .oh-my-zsh and run only zsh returned this:/usr/share/zsh/5.0.2/scripts/newuser:6: zsh-newuser-install: function definition file not found
. Search in web I found this bug report: zsh: Many function definitions are missing zsh-newuser-install, compinit, etc that say it could have a variable overwrite made by Intel compiler :/So a workaround to this problem could be insert the following lines to your .bash_profile, if you can not run this command chsh -s $(which zsh).
FPATH=/home/modelagem/beatriz.fonseca/.oh-my-zsh/plugins/python:/home/modelagem/beatriz.fonseca/.oh-my-zsh/plugins/pip:/home/modelagem/beatriz.fonseca/.oh-my-zsh/plugins/git:/home/modelagem/beatriz.fonseca/.oh-my-zsh/functions:/home/modelagem/beatriz.fonseca/.oh-my-zsh/completions:/usr/share/zsh/site-functions:/usr/share/zsh/5.0.2/functions export FPATH
Além disso, como por um indício de cores: arquivo de definição de função não encontrado # 4607 , Parece que outras pessoas resolveram esse problema adicionando $HOME/usr/share/zsh/'version of zsh'/functions
para resolver isso, pois a instalação do zsh como $HOME/usr
pode causar esse problema.
Leitura adicional
FPATH The search path for function definitions. The directories in this path are searched for a file with the same name as the function or command when a function with the -u attribute is referenced and when a command is not found. If an executable file with the name of that command is found, then it is read and executed in the current environ-ment. environment. ment. Unlike PATH, the current directory must be represented explicitly by . rather than by adjacent : characters or a beginning or ending :.
source
9.1 Autoloading Functions
A function can be marked as undefined using the autoload builtin (or ‘functions -u’ or ‘typeset -fu’). Such a function has no body. When the function is first executed, the shell searches for its definition using the elements of the fpath variable.
source