Macos 作曲家不使用oh my zsh
我已经在我的Mac上安装了composer,它工作得很好 当我加载oh my zsh并在终端中键入“composer”时,我对composer有一个问题,在屏幕上显示以下随机Macos 作曲家不使用oh my zsh,macos,terminal,oh-my-zsh,Macos,Terminal,Oh My Zsh,我已经在我的Mac上安装了composer,它工作得很好 当我加载oh my zsh并在终端中键入“composer”时,我对composer有一个问题,在屏幕上显示以下随机??% 当我在home中通过重命名.zshrc禁用oh my zsh时,它又开始工作了 下面是我的.bash\u配置文件文件 export PATH=/usr/local/bin:$PATH export PATH=/Applications/MAMP/bin/php/php5.4.10/bin:$PATH 这是我的.zs
??%
当我在home中通过重命名.zshrc禁用oh my zsh时,它又开始工作了
下面是我的.bash\u配置文件文件
export PATH=/usr/local/bin:$PATH
export PATH=/Applications/MAMP/bin/php/php5.4.10/bin:$PATH
这是我的.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="azhararmar"
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
# Uncomment this to disable bi-weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# Uncomment to change how often 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 to disable command autocorrection
# DISABLE_CORRECTION="true"
# Uncomment following line if you want red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"
# Uncomment following line if you want to disable marking untracked files under
# VCS as dirty. This makes repository status check for large repositories much,
# much faster.
# DISABLE_UNTRACKED_FILES_DIRTY="true"
# Uncomment following line if you want to shown in the command execution time stamp
# in the history command output. The optional three formats: "mm/dd/yyyy"|"dd.mm.yyyy"|
# yyyy-mm-dd
# HIST_STAMPS="mm/dd/yyyy"
# 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
# User configuration
export PATH=$HOME/bin:/usr/local/bin:$PATH
# export MANPATH="/usr/local/man:$MANPATH"
# # Preferred editor for local and remote sessions
# if [[ -n $SSH_CONNECTION ]]; then
# export EDITOR='vim'
# else
# export EDITOR='mvim'
# fi
# Compilation flags
# export ARCHFLAGS="-arch x86_64"
# ssh
# export SSH_KEY_PATH="~/.ssh/dsa_id"
可能有什么问题?您的.bash\u配置文件或.bashrc
文件中很可能设置了别名。您需要将其移到.zshrc
文件中
export PATH=/usr/local/bin:$PATH
export PATH=/Applications/MAMP/bin/php/php5.4.10/bin:$PATH
别名“composer”=.zshrc文件中的“php~/.composer/composer.phar”
# 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)
# Add wisely, as too many plugins slow down shell startup.
plugins=(git composer)
//EOF
只需运行:
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
如果您已经将composer.phar
移动到/usr/local/bin/composer
,您可以使用:
alias composer="/usr/local/bin/composer"
首先检查是否安装了composer如果安装了composer,则需要
vim ~/.zshrc
添加波纹管行
alias composer="php /usr/local/bin/composer.phar"
如果您的普通终端正常工作,如何检查composer是否已安装,如果您的普通终端显示相同错误,则如何检查composer--versioncd/usr/local/bin/检查composer.phar是否可用。编辑~/.zshrc
并添加:
export PATH="$HOME/.composer/vendor/bin:$PATH"
并刷新它:
. ~/.zshrc
顺便说一下,在~/.zshrc
的开头有一个关于路径的注释:
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
打开.zshrc
并更新插件=(…其他编写器)
…其他是您的其他插件
转到.composer/lalit*/
并键入以下命令:*=用户名
php-r“复制”https://getcomposer.org/installer“,”composer setup.php“;”
php-r“if(hash_文件('sha384','composer setup.php')=='E0012EDF3E80B6978849F5eff0D4B4E4C79FF1609DD1E613307E16318854D24AE64F26D17AF3ef0BF7Cf710CA74755A'){echo'安装程序已验证';}否则{echo'安装程序已损坏';取消链接('composer-setup.php')}echo php"EOL;
php composer setup.php