osx-lion – 将目录添加到.zshrc中的路径

osx-lion – 将目录添加到.zshrc中的路径,第1张

概述我已经在这个问题上待了几天了.我使用zsh并需要设置一个目录路径,以便识别我使用的命令.到目前为止遵循这些步骤: cd ~ls -al ls -al向我展示了这些文件: .oh-my-zsh.profile.putty.rediscli_history.ringo-history.ssh.subversion.viminfo.zcompdump.zsh-update.zsh 我已经在这个问题上待了几天了.我使用zsh并需要设置一个目录路径,以便识别我使用的命令.到目前为止遵循这些步骤:
cd ~ls -al

ls -al向我展示了这些文件:

.oh-my-zsh.profile.putty.rediscli_history.ringo-history.ssh.subversion.viminfo.zcompdump.zsh-update.zsh_history.zshrc

我假设我需要添加.zshrc的路径,所以:

open -e .zshrc

在文件的末尾,我添加了将用于设置项目的命令的路径(使用ringoJs):

export PATH=Users/repos/ringoJs/bin/:$PATH

关闭文件,重新启动终端应用程序,重新启动计算机,但是找不到位于上面路径下的命令(ringo-admin)(/ Users / repos / ringoJs / bin):

ringo-admin create --Google-appengine MyAppnamezsh: command not found: ringo-admin

请帮助我,如果它会有所帮助,这里是我的.zshrc文件内容:

# Path to your oh-my-zsh configuration.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.ZSH_theme="robbyrussell"# Example aliases# alias zshconfig="mate ~/.zshrc"# alias ohmyzsh="mate ~/.oh-my-zsh"# Set to this to use case-sensitive completion# CASE_SENSITIVE="true"# Comment this out to disable bi-weekly auto-update checks# disABLE_auto_UPDATE="true"# Uncomment to change how many often would you like to wait before auto-updates occur? (in days)# export UPDATE_ZSH_DAYS=13# Uncomment following line if you want to disable colors in ls# disABLE_LS_colorS="true"# Uncomment following line if you want to disable autosetting terminal Title.# disABLE_auto_title="true"# Uncomment following line if you want red dots to be displayed while waiting for completion# COMPLETION_WAITING_DOTS="true"# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/# Example format: plugins=(rails git textmate ruby lighthouse)plugins=(git)source $ZSH/oh-my-zsh.sh# Customize to your needs...export PATH=Users/repos/ringoJs/bin/ringo-admin:$PATH

请一步一步指导我,因为我是zsh的新手.感谢名单.

更新:

echo $PATH显示我最近添加的目录:

/Users/repos/ringoJs/bin/ringo-admin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin

我不明白为什么总是找不到命令.

解决方法 你错过了一个领先的斜杠.尝试:
export PATH=/Users/repos/ringoJs/bin/:$PATH
总结

以上是内存溢出为你收集整理的osx-lion – 将目录添加到.zshrc中的路径全部内容,希望文章能够帮你解决osx-lion – 将目录添加到.zshrc中的路径所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/1049263.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-25
下一篇 2022-05-25

发表评论

登录后才能评论

评论列表(0条)

保存