首页 > 系统服务 > 详细

mac 下配置属于自己的shell

时间:2018-07-16 14:46:46      阅读:216      评论:0      收藏:0      [点我收藏+]
mac使用iterm

[https://www.iterm2.com/]()

1. 安装iterm2 
2. 使用oh-my-zsh 
wget https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh 
3. cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
4. vim ~/.zshrc
 ZSH_THEME="robbyrussell"  默认主题

[https://github.com/robbyrussell/oh-my-zsh/wiki/Themes]() 每个主题的说明

主题文件在  ~/.oh-my-zsh/themes

编辑这个主题
vim ~/.oh-my-zsh/themes/robbyrussell.zsh-theme

 PROMPT=‘%{$fg_bold[red]%}? %{$fg_bold[green]%}%p%{$fg[cyan]%}%d %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}% %{$reset_color%}>‘

安装插件
brew install autojump 

修改.zshrc 
[[ -s ~/.autojump/etc/profile.d/autojump.sh ]] && . ~/.autojump/etc/profile.d/autojump.sh

 自定义别名
 vim  ~.zshrc  
 alias cls=‘clear‘
  alias ll=‘ls -l‘
 alias la=‘ls -a‘
 alias vi=‘vim‘
 alias grep="grep --color=auto"

mac 下配置属于自己的shell

原文:http://blog.51cto.com/xiaocainiaox/2144300

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!