simnalamburt / shellder

:shell: Featured zsh/fish shell theme
Other
292 stars 54 forks source link

Faster existance checking #27

Closed pbzweihander closed 6 years ago

pbzweihander commented 6 years ago

According to this article, $+functions[foo] is much faster than type foo > /dev/null in zsh.

simnalamburt commented 6 years ago

Very nice!

simnalamburt commented 6 years ago

@pbzweihander Is this patch really work? Looks like it is (( $+commands[shrink_path] )) instead of (( $+functions[shrink_path] )).

simnalamburt commented 6 years ago

Oh I see since shrink_path is a function defined by oh-my-zsh, so you used $+functions instead of $+commands right?

pbzweihander commented 6 years ago

screenshot from 2017-10-31 15-35-34 Yes, I already tested it and it works perfectly!