zshrc

zsh: command not found: modernizr

ぐ巨炮叔叔 提交于 2019-12-12 03:22:19
问题 I installed modernizr: npm install -g modernizr Everything went well without errors: /Users/myusername/npm/bin/modernizr -> /Users/myusername/npm/lib/node_modules/modernizr/bin/modernizr /Users/myusername/npm/lib After install running: modernizr I get: zsh: command not found: modernizr In my .zshrc file I have: export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin" After googling around find this post: Bower: "command not found" after installation and added this line to my .zshrc file:

What is `-a` in a Zshell function and what does it have to do with my shell immediately exiting?

∥☆過路亽.° 提交于 2019-12-11 14:57:00
问题 I'm having an issue with my .zshrc file while using oh-my-zsh. Recently, I've started trying to be more careful about mucking with my base OS environment, so I installed Python (2 and 3) and pyenv using homebrew. While trying to configure the autocomplete for pyenv, I switched on the pyenv plugin in oh-my-zsh. This resulted in my shell shutting down during the launch. I found that I could prevent this from happening by commenting out most of the active portion of the pyenv oh-my-zsh plugin,

Variable names in prompt instead of path

有些话、适合烂在心里 提交于 2019-12-11 04:28:39
问题 How can I prevent my zsh prompt from showing the variable name a path is assigned to instead of the path itself? foo="/some/path" cd "$foo" shows $ ~foo/ in my prompt instead $ /some/path/ 回答1: From the comments: you're seeing Named Directories. Check if AUTO_NAME_DIRS is set ( setopt | grep AUTO_NAME_DIRS ) - to disable this functionality, turn it off. 来源: https://stackoverflow.com/questions/16203555/variable-names-in-prompt-instead-of-path

zsh prompt and hostname

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-09 16:01:16
问题 I use the following prompt in .zshrc: PROMPT="%{$fg[magenta]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%1~ %{$reset_color%}%# " When I open terminal I see this prompt: zoltan@zoltan-Macbook-Pro ~ % Is it possible to drop the text "zoltan" in the hostname? I would like to make it look like this: zoltan@Macbook-Pro ~ % Any suggestion would be greatly appreciated. Thank you! 回答1: It's a bit of a mess, but you can pretend the %m is a parameter and use parameter expansion to strip the

oh-my-zsh plugins not working

亡梦爱人 提交于 2019-12-06 17:39:16
问题 I've just discovered oh-my-zsh, but I can't get it to work. While themes work just perfectly, plugins do not. I have some plugins selected, eg. macports, but neither I get port command completion nor do appropriate aliases work. Here's my .zshrc: # Path to your oh-my-zsh configuration. export ZSH=$HOME/.oh-my-zsh # Set name of the theme to load. # Look in ~/.oh-my-zsh/themes/ # Optionally, if you set this to "random", it'll load a random theme each # time that oh-my-zsh is loaded. export ZSH

Why does virtualenv inherit $PYTHONPATH from my shell?

末鹿安然 提交于 2019-12-06 01:41:34
问题 So I'm migrating all my tools from python2 to python3.4 on an Ubuntu 14.04 machine. So far I've done the following: aliased python to python3 in my zshrc for just my user installed pip3 on the system itself (but I'll just be using virtualenvs for everything anyway so I won't really use it) changed my virtualenvwrapper "make" alias to mkvirtualenv --python=/usr/bin/python3 ('workon' is invoked below as 'v') Now curiously, and you can clearly see it below, running python3 from a virtualenv

How to make zsh forward-word behaviour same as in bash/emacs

梦想的初衷 提交于 2019-12-05 13:05:42
问题 zsh forward-word acts a bit different from bash/emacs, and I'd like to change that. Instead of description of all differences, let me just show you step by step behaviour of bash. I marked cursor as "^" symbol. foo bar --non-needed-param --needed-param^ M-b foo bar --non-needed-param --needed-^param M-b foo bar --non-needed-param --^needed-param M-b foo bar --non-needed-^param --needed-param M-b foo bar --non-^needed-param --needed-param M-b foo bar --^non-needed-param --needed-param M-b foo

oh-my-zsh plugins not working

牧云@^-^@ 提交于 2019-12-05 00:44:08
I've just discovered oh-my-zsh, but I can't get it to work. While themes work just perfectly, plugins do not. I have some plugins selected, eg. macports, but neither I get port command completion nor do appropriate aliases work. Here's my .zshrc: # Path to your oh-my-zsh configuration. export ZSH=$HOME/.oh-my-zsh # Set name of the theme to load. # Look in ~/.oh-my-zsh/themes/ # Optionally, if you set this to "random", it'll load a random theme each # time that oh-my-zsh is loaded. export ZSH_THEME="steeef" # Set to this to use case-sensitive completion # export CASE_SENSITIVE="true" # Comment

terminal vim not loading .zshrc

橙三吉。 提交于 2019-12-04 23:39:31
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) From the manual: Commands are first read from /etc/zshenv; this cannot be overridden. [...] Commands are then read from $ZDOTDIR/.zshenv. If the shell is a login shell, commands are read from /etc/zprofile and then $ZDOTDIR/

zsh change prompt input color

一世执手 提交于 2019-12-04 22:31:35
问题 I want to change the color of the input text in zsh (the text that I type for each command). Example: in user@host> ls ~/ I would want ls ~/ to be yellow to stand out from standard output. I know I can accomplish this in bash using export PS1=" $BIGreen \u@\h \w \$ $IYellow" At the end of the prompt, the color is set to Yellow, input text I type is yellow (with the appropriate color variables defined). And then trap 'echo -ne "\e[0m"' DEBUG Which resets the color to normal when the outputs of