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

目录

查看当前环境

检查当前使用的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
上一篇:云数据库MySQL的选择


下一篇:MySQL - 性能优化