scmbreeze / scm_breeze

Adds numbered shortcuts to the output git status, and much more
https://madebynathan.com/2011/10/19/git-shortcuts-like-youve-never-seen-before/
MIT License
2.82k stars 192 forks source link

command not found: compdef on zsh after upgrading from bash #303

Closed hjobrien closed 3 years ago

hjobrien commented 3 years ago

Hi, I've been using this for awhile on bash, but I recently updated to zsh because that's the new standard shell for macOS. however, I now get /Users/Hank/.scm_breeze/lib/git/aliases.sh:190: command not found: compdef when I open a new terminal, although it seems like the functionality of scm_breeze is still there (though I haven't thoroughly tested this), is there something I can do to fix this? I'm also using powerlevel10k with zsh, so I'm not sure how that plays into this as well

ghthor commented 3 years ago

Well compdef is a zsh function that is used to register command completions. If which compdef or type compdef isn't returning anything you might need to enable completions in zsh, which I'm not sure exactly how to do that but this might get you started.

powerlevel10k might have another way to enable completions that will internally enable the zsh completion system, that would be worth checking out as well.

ghthor@hivemind ~/.scm_breeze (git)-[remotes/ghthor/master] % type compdef
compdef is a shell function from /usr/share/zsh/functions/Completion/compinit
hjobrien commented 3 years ago

thanks @ghthor ! I ran both of those and found that another library I had installed (nvm) reimplemented or somehow imported compdef, so I put the line loading that above the one for scm_breeze in my .zshrc and everything is working as expected now. It's not the best solution in the world, but I think it should be good enough for me