zshrc

Weird behaviour with zsh PATH

时光总嘲笑我的痴心妄想 提交于 2020-01-06 02:42:26
问题 I just encourage a weird problem with zsh today. My environment is Mac OS X Yosemite, zsh 5.0.5 (x86_64-apple-darwin14.0) In .zshrc, I have manually set the PATH variable to something like export PATH="$PATH:~/.composer/vendor/bin" Try echo $PATH in terminal, the result is as expected (contained ~/.composer/vendor/bin ). Then try executing a binary from ~/.composer/vendor/bin , It'll always return me "zsh: command not found" error. Try switching to bash, echo $PATH is also as expected, have

NPM Command Not Found After Installing Node

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-29 20:41:11
问题 I am having a very hard time getting the npm command to work, and unfortunately my knowledge of unix isn't good enough to solve this on my own. All I've done is brew install node , and I get the following errors: When I type npm I get zsh: command not found: npm Looking into this issue more I found this stack overflow answer: Command not found after npm install in zsh Following its advice I tried adding export PATH=/usr/local/share/npm/bin:$PATH to my .zshrc file. Still get the same error

zsh prompt wrapping to a newline after adding buildstatus

安稳与你 提交于 2019-12-25 06:19:06
问题 I'm attempting to add my Buildkite (ci build server) project status to the zsh prompt! I've written a ruby script that pulls the status and puts it into a colon separated file in the following format: # .buildkite_status project1: √ project2: x The √ and x are ansi colour coded. And I have a prompt that works fine until I add my $ci_build variable/function to the RPROMPT! At the moment my prompt looks like; ~/.dotfiles » ± master*:3cce1cb and after the change I want ~/.dotfiles » ± master*

terminal vim not loading .zshrc

谁说胖子不能爱 提交于 2019-12-22 01:52:00
问题 My terminal vim configuration is not loading the ~/.zshrc. Zsh is the environment login shell. What is the proper configuration for this situation? Here are some measures I've already taken and since removed: set shell=zsh (uses zsh as shell but doesn't source the rc) set shellcmdflag=-ci (all output suspended) cat ~/.zshenv $ source ~/.zshrc (many errors when opening vim) 回答1: From the manual: Commands are first read from /etc/zshenv; this cannot be overridden. [...] Commands are then read

How does the matcher-list arguments work in zsh zstyle completion?

与世无争的帅哥 提交于 2019-12-21 04:28:22
问题 I'm trying to configure my ~/.zshrc so code completion on files/dirs work as I need it. I've found various ressources online on the zstyle completion syntax, and code example but some parts of it are still black magic to me. So far, here is where I am, after some fiddling and testing : zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'm:{a-zA-Z}={A-Za-z} l:|=* r:|=*' Here is what I understand from it : zstyle ':completion:*' means we are going to define a config value for completion

ZSH RPROMPT weird spacing?

天大地大妈咪最大 提交于 2019-12-20 10:58:32
问题 Here is my ZSH prompt theme function git_prompt_info() { ref=$(git symbolic-ref HEAD 2> /dev/null) || return echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX" } PROMPT='$fg[yellow]%}⚡︎ $fg[cyan]%~ $(git_prompt_info) %{$reset_color%}→ ' ZSH_THEME_GIT_PROMPT_PREFIX="[git:" ZSH_THEME_GIT_PROMPT_SUFFIX="]$reset_color" ZSH_THEME_GIT_PROMPT_DIRTY="$fg[red]+" ZSH_THEME_GIT_PROMPT_CLEAN="$fg[green]" RPROMPT='%T' Which looks like When I move the $(git

How can you export your .bashrc to .zshrc?

与世无争的帅哥 提交于 2019-12-20 08:04:10
问题 I am trying to move to zsh from Bash. I put my .bashrc directly to my .zshrc, and it caused a lot of errors when I try to use Bash again. How can you export your .bashrc to .zshrc? 回答1: While lhunath's answer pushed me in the right direction, zsh does not seem to source .profile automatically. Lot's of good info on this topic can be found on this superuser post. The adaption I'm using is putting common aliases and functions in .profile and manually sourcing them as follows: .bashrc source ~/

How can you export your .bashrc to .zshrc?

筅森魡賤 提交于 2019-12-20 08:03:14
问题 I am trying to move to zsh from Bash. I put my .bashrc directly to my .zshrc, and it caused a lot of errors when I try to use Bash again. How can you export your .bashrc to .zshrc? 回答1: While lhunath's answer pushed me in the right direction, zsh does not seem to source .profile automatically. Lot's of good info on this topic can be found on this superuser post. The adaption I'm using is putting common aliases and functions in .profile and manually sourcing them as follows: .bashrc source ~/

oh-my-zsh config file not loading

邮差的信 提交于 2019-12-18 04:30:10
问题 I am trying to get ZSH config working correctly on Mac OSX. I installed it using curl: curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh . Then I modified my zshrc file to fit my needs. It works only after I run source ~/.zshrc . But then if I come back and open a new tab or new terminal I have to do source ~/.zshrc to get the config settings to work again. Has anybody ran into this issue? I believe there is a way to make it so I don't have to do source ~/

Adding an alias for Sublime Text to zshrc

别来无恙 提交于 2019-12-13 12:01:37
问题 Just have a quick question on how to add an alias for SublimeText to my ZSH. I've been to their site where they tell you how to do it within bash, but I don't understand how to do it within ZSH. It has been killing me, I just want to open text files from my command prompt. Anyone out there have experience with ZSH where they have created aliases? 回答1: Aliases in zsh are created in the same manner as in bash . alias somealias='something longer' Now somealias will expand to 'something longer'