【发布时间】:2012-12-12 22:07:24
【问题描述】:
我想弄清楚为什么我的 oh-my-zsh 主题不能正常工作。颜色正确显示,但背景保持白色(带有黑色文本)。下面是我的 /.zshrc 文件和当前路径变量:
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
export PATH="$HOME/.rbenv/bin:$PATH"
eval "$(rbenv init -)"
# 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="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 weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# 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 rails ruby brew)
source $ZSH/oh-my-zsh.sh
# Customize to your needs...
autoload -U colors
colors
这里是 $PATH :
➜ ~ echo $PATH
/Users/natascha/.rbenv/shims:/Users/natascha/.rbenv/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/git/bin:/usr/texbin
我在 Mac OS X 10.7.5 上并在几个月前安装了 oh-my-zsh。我在 git 问题中发了一个帖子,https://github.com/robbyrussell/oh-my-zsh/issues/929#issuecomment-11652602,它似乎仍然没有解决?我的插件工作(即我可以为“rails 控制台”键入 rails c)。
感谢您的帮助。
【问题讨论】:
-
您有一些颜色(
➜ ~是红色和浅绿色),但不是全部?在Terminal.app中使用.zshrc和oh-my-zsh的Basic主题,我有一个白色背景/黑色文本,红色➜和浅绿色~。这是你所期待的吗?目前还不太清楚您没有正确看到哪些颜色以及您是哪种颜色 - 一些屏幕截图可能会有所帮助。 :) -
@simont,在我的 .zshrc 中,我清楚地声明了 "export ZSH_THEME="robbyrussell"" ,它不应该看起来像 robbyrussell 主题(黑色背景和白色文本吗?)。哪几行然后,如果我只是加载主题本身,则负责白色背景和黑色文本,并且主题看起来与此不同(即黑色背景和白色文本)。