我刚刚发现了哦-my-zsh,但是我不能让它工作。虽然主题可以完美地工作,但插件却不能。我有一些插件选择,例如。macports,但我既没有得到端口命令完成,也没有适当的别名工作。这是我的.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 this out to disable weekly auto-update checks
# export DISABLE_AUTO_UPDATE="true"
# Uncomment following line if you want to disable colors in ls
# export DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
# export DISABLE_AUTO_TITLE="true"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git osx github macports textmate svn)
source $ZSH/oh-my-zsh.sh
# Customize to your needs...
export PATH=/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin/:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin:/usr/local/cuda/bin:/usr/local/cuda/bin:/opt/local/bin:/opt/local/sbin
textmate和osx插件似乎也不起作用-- zsh只是抱怨未知的命令并停止。git和svn有一些基本的补全功能,但我不确定它是通过插件完成的,还是只是一个普通的zsh补全功能。我必须导出一些东西才能使用这些插件吗?或者如果没有,该怎么做才能解决这个问题呢?
发布于 2011-11-22 16:57:51
我被这玩意儿咬了。
实际情况是,您执行了手动安装,手动安装的说明中没有提到您需要自己设置PATH
。
因此,您最终将使用默认路径。自动设置代码的源代码复制您当前的路径并将其附加到.zshrc
,如果您依赖非标准PATH
条目(例如,您在Mac上运行Homebrew ),这是不够的。
所以解决方法很简单:
启动旧的~/.zshrc
及其配置文件,然后将$PATH
的值复制并粘贴到shell文件的顶部。
再见!
发布于 2016-03-11 08:06:04
确保在初始化zsh之前定义插件变量:
plugins=(git wd)
export ZSH=/home/<user>/.oh-my-zsh
source $ZSH/oh-my-zsh.sh
发布于 2014-01-15 06:00:02
我刚才也遇到了同样的问题!我的Archlinux中安装了一个名为grml-zsh-config
的软件包。我删除了这个包,oh-my-zsh
主题开始工作。
https://stackoverflow.com/questions/6800952
复制相似问题