zsh

Conda command not found

旧时模样 提交于 2019-11-28 16:04:40
I've installed Miniconda and have added the environment variable export PATH="/home/username/miniconda3/bin:$PATH" to my .bachrc and .bash_profile but still can't run any conda commands in my terminal. Am I missing another setup? I'm using zsh by the way. olivrg 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

CentOS 7.x 安装 ZSH 终端

◇◆丶佛笑我妖孽 提交于 2019-11-28 16:03:43
一、安装基本组件 首先执行 yum 命令来安装需要的 zsh 原始程序与 git 程序来 pull 代码。 yum install -y zsh git 安装 oh my zsh 脚本 (这一步需要安装 git )。 wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh 使用 which zsh 查看 zsh 的安装目录,一般都存储在 /usr/bin/zsh 目录下。 which zsh 使用 chsh 命令切换使用的 shell 程序。 chsh -s /usr/bin/zsh 二、进行可选配置 2.1 安装 ZSH 图标字体 执行以下命令在当前目录拉取图标的仓库,并切换到其目录下,执行 ./install.sh 脚本即可安装成功。 git clone https://github.com/powerline/fonts.git 2.2 更换 ZSH 主题 使用 vi 工具编辑 /root/.zshrc 文件,更改 ZSH_THEME="robbyussell" 字段为 ZSH_THEME="agnoster" 字段,并通过 source ~/.zshrc 命令更新它们的配置文件。 2.3 安装插件 使用 ZSH 替换原有的 SHELL

Command not found after npm install in zsh

不羁的心 提交于 2019-11-28 15:45:40
问题 I'm having some problems installing vows via npm in zsh. Here's what I get. I tried installing it with and without the -g option. Do you have any idea what's wrong here? [❤ ~/Desktop/sauce-node-demo:master] npm install -g vows npm http GET https://registry.npmjs.org/vows npm http 304 https://registry.npmjs.org/vows npm http GET https://registry.npmjs.org/eyes npm http GET https://registry.npmjs.org/diff npm http 304 https://registry.npmjs.org/eyes npm http 304 https://registry.npmjs.org/diff

Can I profile my .zshrc/.zshenv?

不羁岁月 提交于 2019-11-28 15:37:22
问题 It seems like my shell is taking way too long to start up. Is there any way to profile it so I can figure out what's slowing it down so much? 回答1: Try adding this at the beginning of the file: # set the trace prompt to include seconds, nanoseconds, script name and line number # This is GNU date syntax; by default Macs ship with the BSD date program, which isn't compatible PS4='+$(date "+%s:%N") %N:%i> ' # save file stderr to file descriptor 3 and redirect stderr (including trace # output) to

Check if current directory is a Git repository

被刻印的时光 ゝ 提交于 2019-11-28 15:11:48
I am writing a series of scripts for Git management in zsh. How do I check if the current directory is a Git repository? (When I'm not in a Git repo, I don't want to execute a bunch of commands and get a bunch of fatal: Not a git repository responses). jabbie Copied from the bash completion file the following is a naive way to do it # Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org> # Conceptually based on gitcompletion (http://gitweb.hawaga.org.uk/). # Distributed under the GNU General Public License, version 2.0. if [ -d .git ]; then echo .git; else git rev-parse --git-dir 2>

RVM is not working in ZSH

…衆ロ難τιáo~ 提交于 2019-11-28 15:11:16
I'd like to try out the ZSH shell on my Mac, but I also do a lot of Ruby and Rails development, so I use RVM quite a bit too. The problem is that I can't seem to get RVM to work in ZSH, and it's working fine in the default Bash shell: > zsh > rvm 1.9.2 > ruby -v ruby 1.8.7 (2009-06-12 patchlevel 174) [universal-darwin10.0] > which ruby /usr/bin/ruby I can definitely confirm that RVM is installed, as well as ruby 1.9.2 under RVM; I use it all the time in Bash. Running an rvm list in ZSH shows this, interestingly: rvm rubies ruby-1.8.7-p302 [ x86_64 ] => ruby-1.9.2-p0 [ x86_64 ] This is

Complex Git branch name broke all Git commands

三世轮回 提交于 2019-11-28 14:59:36
I was trying to create a branch from master with the following command, git branch SSLOC-201_Implement___str__()_of_ProductSearchQuery when Git suddenly stopped responding. I suspect the unescaped () are to blame, somehow. Now, whenever I try to run any Git command, I get the same error: git:176: command not found: _of_ProductSearchQuery with the number after git increasing every time I type a command. Can anyone explain what happened? And how do I get back to normal? I'd like to delete that branch, but how can I do that? jub0bs Problem Can anyone explain what happened? [...] I'd love to be

OSX 10.10 yosemite beta on git pull: git-sh-setup: No such file or directory

谁说胖子不能爱 提交于 2019-11-28 14:04:21
问题 After upgrading to OSX 10.10 Yosemite Beta, running git pull is returning the following error: /Library/Developer/CommandLineTools/usr/libexec/git-core/git-pull: line 11: git-sh-setup: No such file or directory I've checked the referenced git-core directory and the git-sh-setup.sh is there. Other git commands are working exactly as expected 回答1: I think the cleanest solution for this for now is to change the initial command in your iTerm session to be /usr/bin/login -f <your user name> This

How to make zsh run as a login shell on Mac OS X (in iTerm)?

怎甘沉沦 提交于 2019-11-28 13:12:28
问题 When zsh is set as a login shell on Mac OS X, when it is started by iTerm, zsh doesn't consider that it's being run as a login shell, although it's started as ‘-zsh’ (‘-’ is put as the first character of arg[0]) which is supposed to mean that it should start as a login shell. So, when I set the login shell to bash, bash recognizes this first ‘-’ in $0 and runs as a login shell, but zsh doesn't, although it seems that it should. Is there a way to either make zsh recognize the ‘-’ in the arg[0]

Variable expansion is different in zsh from that in bash

倾然丶 夕夏残阳落幕 提交于 2019-11-28 09:11:17
The following is a simple test case for what I want to illustrate. In bash, # define the function f f () { ls $args; } # Runs the command `ls` f # Runs the fommand `ls -a` args="-a" f # Runs the command `ls -a -l` args="-a -l" f But in zsh # define the function f f () { ls $args } # Runs the command `ls` f # Runs the fommand `ls -a` args="-a" f # I expect it to run `ls -a -l`, instead it gives me an error args="-a -l" f The last line in the zsh on above, gives me the following error ls: invalid option -- ' ' Try `ls --help' for more information. I think zsh is executing ls "-a -l" which is