📂
JackyChen的精神時光屋
  • About
  • iPlayground
    • iPlayground 2020
      • iPlayground submit 2020
    • iPlayground 2019
      • Untitled
      • iPlayground submit 2019
  • WWDC
    • 2020 WWDC
    • 2019 WWDC
    • 2018 WWDC
      • What's New in Testing
      • BusinessChat
    • 2016 WWDC
      • What's New in the Apple Push Notification Service
  • AR/VR
    • ARKit plugin at Unity
    • ARKit
    • AR/VR 實習作品分享
    • Google Blocks
  • CI/CD
    • Continous Integretion for Unity
    • 拯救地球大作戰-自動化設定注意事項
    • Provisioning Profile 自動化更新
    • Make ipa file with personal team of code sign
    • Xcode11 版號問題
  • Test
    • Cucumberish
    • XCUITest
    • Design Patterns in XCUITest
    • Unit Test
  • User Interface
    • IBDesignable 和 IBInspectable
    • iOS 使用貝塞爾曲線繪製路徑
    • UIStatusBarStyle
    • iOS Devices Specification
    • Vector Image
    • Launch Screen
    • Haptic Feedback
    • Good Works for Storyboard
    • Cell 展開收合效果
    • ScrollView
    • Swift lazy
    • Lottie
  • Foundation
    • Adding a Custom Font to Your App
    • WKWebView how to work with javascript
    • Global Central Dispatch
    • HealthKit
    • Error Handling
    • Debug with LLDB
    • Application Lifecycle
    • Swift Codable
    • Push Notifications
    • AVFoudation
  • Others
    • C語言指標概念
    • UnsafePointer(Swift)
    • iOS News Reference
    • Blender
    • Free Web Server
    • Firebase
    • Firebase migration
    • GraphQL
    • Ruby
    • zsh command line
    • visudo
  • Security
    • 課程:App資安規劃與實作
    • KeyChain
    • iOS反組譯程序
    • Arxan
  • Git
    • Git
    • xcodeproj 合併衝突
    • Pull Request
  • Machine Learning
    • CoreML
    • Vision
    • Turi Create
  • 待分類
    • ABI Stability and More
    • Mirror
    • Carthage
    • SwiftUI
    • MVVM
    • OpenSSL
    • USDZ Convert
    • Nexus repository and gitlfs
Powered by GitBook
On this page
  • 套用 nerd.terminal 設定
  • 安裝 zsh
  • 安裝 zsh theme powerlevel9k
  • 編輯 ~/.zshrc
  • 安裝 sourcecodepro-nerd-font 字型

Was this helpful?

  1. Others

zsh command line

Terminal 樣式設定

PreviousRubyNextvisudo

Last updated 4 years ago

Was this helpful?

套用 nerd.terminal 設定

  • 先下載 nerd.terminal

  • 打開 terminal.app -> 終端機 -> 偏好設定

  • 點左下角齒輪 -> 匯入 nerd.terminal

  • 將 nerd 設定為預設值

安裝 zsh

用 homebrew 安裝

brew install zsh

並把 zsh 設定為你的預設 shell

sudo sh -c "echo $(which zsh) >> /etc/shells" 
chsh -s $(which zsh)

安裝 on-my-zsh

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
git clone https://github.com/bhilburn/powerlevel9k.git ~/.oh-my-zsh/custom/themes/powerlevel9k

編輯 ~/.zshrc

ZSH_THEME="powerlevel9k/powerlevel9k"

# command line 左邊想顯示的內容
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir dir_writable vcs) # <= left prompt 設了 "dir vcs"

# command line 右邊想顯示的內容
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status time) # <= right prompt 設了 "status time"

POWERLEVEL9K_MODE='nerdfont-complete'

安裝 sourcecodepro-nerd-font 字型

字型檔已無法透過 Homebrew 下載,必須手動處理

  • 解壓縮

  • 打開 Spotlight,搜尋字體簿

  • 點+匯入字型檔

  • 打開 terminal.app -> 終端機 -> 偏好設定

  • 選 nerd -> 字體 ->更改,選 Source Code Pro Nerd Font Complete

參考連結

安裝 zsh theme

powerlevel9k
下載字型檔
超簡單!十分鐘打造漂亮又好用的 zsh command line 環境
zsh + oh-my-zsh
47KB
nerd.terminal