gpt4 book ai didi

zsh - 如何修复 oh-my-zsh 插件无法工作的问题

转载 作者:行者123 更新时间:2023-12-02 17:45:46 24 4
gpt4 key购买 nike

我刚刚发现了 oh-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 补全功能。我需要导出一些东西才能使用这些插件吗?或者如果没有,该怎么做才能解决这个问题?

最佳答案

确保在初始化 zsh 之前定义插件变量:

plugins=(git wd)
export ZSH=/home/<user>/.oh-my-zsh
source $ZSH/oh-my-zsh.sh

关于zsh - 如何修复 oh-my-zsh 插件无法工作的问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6800952/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com