How to make zsh run as a login shell on Mac OS X (in iTerm)?
chsh -s $(which zsh) You’ll be prompted for your password, but once you update your settings any new iTerm/Terminal sessions you start on that machine will default to zsh.
chsh -s $(which zsh) You’ll be prompted for your password, but once you update your settings any new iTerm/Terminal sessions you start on that machine will default to zsh.
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
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
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
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
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.
Running the following solved the problem: rm ~/.zcompdump* Note: The * is incase there are multiple .zcompdump files.
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
I had a similar issue. I ran brew cleanup which fixed the symlinks.
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