ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

Mac 终端窗口配置 oh-my-zsh

2019-11-13 21:50:35  阅读:379  来源: 互联网

标签:11 oh my Mac himonkey zsh staff


目录

查看当前环境

检查当前使用的shell

Mac 默认使用 bash,当然也可以使用如下命令查看已安装的 shell

bogon:~ himonkey$ echo $SHELL
/bin/bash

查看已经安装的shell

bogon:~ himonkey$ cat /etc/shells 
# List of acceptable shells for chpass(1).
# Ftpd will not allow users to connect who are not using
# one of these shells.

/bin/bash
/bin/csh
/bin/ksh
/bin/sh
/bin/tcsh
/bin/zsh

查看当前zsh的版本号

bogon:~ himonkey$ zsh --version
zsh 5.3 (x86_64-apple-darwin18.0)

查看当前最新的zsh版本号,使用homebrew,可以看到当前最新是5.7.1

bogon:~ himonkey$ brew info zsh
zsh: stable 5.7.1 (bottled), HEAD
UNIX shell (command interpreter)
https://www.zsh.org/
Not installed
From: https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git/Formula/zsh.rb
==> Dependencies
Required: ncurses ✘, pcre ✘
==> Options
--HEAD
    Install HEAD version
==> Analytics
install: 41,546 (30 days), 122,176 (90 days), 572,107 (365 days)
install_on_request: 39,529 (30 days), 117,505 (90 days), 538,051 (365 days)
build_error: 0 (30 days)

brew 安装最新 zsh

原系统的 zsh 不动它,使用 brew 安装最新的 zsh 。

bogon:~ himonkey$ brew install zsh
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/cask-versions and homebrew/cask).

==> Installing dependencies for zsh: ncurses and pcre
==> Installing zsh dependency: ncurses
==> Downloading https://homebrew.bintray.com/bottles/ncurses-6.1.mojave.bottle.t
==> Downloading from https://akamai.bintray.com/01/01e031f6bb1513edcb26d78a15dc5
######################################################################## 100.0%
==> Pouring ncurses-6.1.mojave.bottle.tar.gz
==> Caveats
ncurses is keg-only, which means it was not symlinked into /usr/local,
because macOS already provides this software and installing another version in
parallel can cause all kinds of trouble.

If you need to have ncurses first in your PATH run:
  echo 'export PATH="/usr/local/opt/ncurses/bin:$PATH"' >> ~/.bash_profile

For compilers to find ncurses you may need to set:
  export LDFLAGS="-L/usr/local/opt/ncurses/lib"
  export CPPFLAGS="-I/usr/local/opt/ncurses/include"

==> Summary

标签:11,oh,my,Mac,himonkey,zsh,staff
来源: https://www.cnblogs.com/himonkey/p/11853487.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有