fasd icon indicating copy to clipboard operation
fasd copied to clipboard

Do not "eval" in zsh's _fasd_preexec

Open blueyed opened this issue 8 years ago • 2 comments

This causes the following to misbehave:

% foo=0
% $((foo++))
zsh: command not found: 1
% echo $foo
2

While it should be:

% foo=0
% $((foo++))
zsh: command not found: 0
% echo $foo
1

This should probably also not be used with the other shells, but I have not investigated there.

blueyed avatar Aug 12 '16 20:08 blueyed

Should this also be done to the other evals (e.g. if you use zsh_word_compl...?) I get a cryptic error if I try to source the $fasd_cache generated by fasd --init zsh-hook posix-alias zsh-ccomp-install zsh-ccomp zsh-wcomp-install zsh-wcomp >| "$fasd_cache"

Error:

(eval):11: parse error near `_fasd_zsh_word_compl...'

ixil avatar Dec 14 '18 12:12 ixil

This is a pretty big bug. I recently ran into this and it was a devil to track down. Every time I declared a function, it fasd's pre-exec eval would null out the fasd function and make it equal to ... which would then cause tab completion to completely stop working.

@clvv I know that you haven't been paying a bunch of attention to this project, but is there any way that you would be willing to merge this one PR?

aauren avatar Mar 20 '20 14:03 aauren