Git tab completion not working in zsh on mac

TL;DR one-liner echo ‘autoload -Uz compinit && compinit’ >> ~/.zshrc && . ~/.zshrc this will enable completion in .zshrc and apply the setting to your current terminal session. Explanation: Actually, ZSH does know how to do git completion out of the box, but you need to turn on the completion feature itself (which from the … Read more

Conda command not found

If you’re using zsh and it has not been set up to read .bashrc, you need to add the Miniconda directory to the zsh shell PATH environment variable. Add this to your .zshrc: export PATH=”/home/username/miniconda/bin:$PATH” Make sure to replace /home/username/miniconda with your actual path. Save, exit the terminal and then reopen the terminal. conda command … Read more

npm global path prefix

Extending your PATH with: export PATH=/usr/local/share/npm/bin:$PATH isn’t a terrible idea. Having said that, you shouldn’t have to do it. Run this: npm config get prefix The default on OS X is /usr/local, which means that npm will symlink binaries into /usr/local/bin, which should already be on your PATH (especially if you’re using Homebrew). So: npm … Read more

Comments in command-line Zsh

Having just started trying out zsh, I ran into this problem too. You can do setopt interactivecomments to activate the bash-style comments. The Z Shell Manual indicates that while this is default behavior for ksh (Korn shell) and sh (Bourne shell), and I am guessing also for bash (Bourne-again shell), it is not default for … Read more

ZSH alias with parameter

If you really need to use an alias with a parameter for some reason, you can hack it by embedding a function in your alias and immediately executing it: alias example=”f() { echo Your arg was $1. };f” I see this approach used a lot in .gitconfig aliases.

oh-my-zsh slow, but only for certain Git repo

You can add this to your git config and zsh won’t check the status anymore git config –add oh-my-zsh.hide-status 1 git config –add oh-my-zsh.hide-dirty 1 Explanation There are two central git functions in in lib/git.zsh: git_prompt_info() parse_git_dirty() Each Method has a git config switch to disable it: oh-my-zsh.hide-status oh-my-zsh.hide-dirty Some themes create their own git … Read more

Where to place $PATH variable assertions in zsh?

tl;dr version: use ~/.zshrc And read the man page to understand the differences between: ~/.zshrc, ~/.zshenv and ~/.zprofile. Regarding my comment In my comment attached to the answer kev gave, I said: This seems to be incorrect – /etc/profile isn’t listed in any zsh documentation I can find. This turns out to be partially incorrect: … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)