码迷,mamicode.com
首页 > 其他好文 > 详细

zsh

时间:2019-08-11 14:57:45      阅读:128      评论:0      收藏:0      [点我收藏+]

标签:change   sel   curl   root   shel   magic   load   bre   racket   

快速安装

# 使用 curl
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
# 或者使用 wget
$ sh -c "$(wget https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"

配置主题

从官网中可以预览各种主题,见 https://github.com/robbyrussell/oh-my-zsh/wiki/Themes。配置主题只需按一下步骤

# 1)修改 ZSH_THEME 值为想要设置的主题,允许无主题
$ vim ~/.zshrc
# 2)使配置生效
$ source ~/.zshrc

禁止粘贴命令时自动对特殊字符进行转义

(1)编辑 misc.zsh 文件

vim  ~/.oh-my-zsh/lib/misc.zsh

(2)注释掉 url-quote-magic

#if [[ $ZSH_VERSION != 5.1.1 ]]; then
#  for d in $fpath; do
#       if [[ -e "$d/url-quote-magic" ]]; then
#               if is-at-least 5.1; then
#                       autoload -Uz bracketed-paste-magic
#                       zle -N bracketed-paste bracketed-paste-magic
#               fi
#               autoload -Uz url-quote-magic
#               zle -N self-insert url-quote-magic
#      break
#       fi
#  done
#fi

解决中文乱码

~/.zshrc添加

export LC_ALL=en_US.UTF-8  
export LANG=en_US.UTF-8

然后执行

source ~/.zshrc

更换系统默认的 shell 为 zsh

$ chsh -s /bin/zsh

无法手动更新 zsh

$cd .oh-my-zsh/ ( to change to its root directory)
$git status (now you should be in your oh-my-zsh root with master on it and do git status)
$git stash/git add . (to stash the changes and head back to master/add the changes)
$git commit -m (if you decided to add the changes)
$upgrade_oh_my_zsh (you can now upgrade)

zsh

标签:change   sel   curl   root   shel   magic   load   bre   racket   

原文地址:https://www.cnblogs.com/lshare/p/11334760.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!