用 zsh-bench 來測試 zsh 啟動速度

在調效 zsh 環境時 (使用 Prezto 取代 Oh-My-Zsh),找到一個算是簡單上手的效能測試工具 zsh-bench (https://github.com/romkatv/zsh-bench),在設定 prezto 時就是用它來比較各種設定下的 zsh 啟動速度。 執行 zsh-bench git clone 該 repo 1 git clone https://github.com/romkatv/zsh-bench 執行 zsh-bench ...

03 June 2024 · 2 min · nyo

使用 Prezto 取代 Oh-My-Zsh

我的 terminal 環境目前是 oh-my-zsh,使用上常常會在開啟或是輸入指令有明顯的 lag,oh-my-zsh 雖然有大量的 plugin 可以使用,但是實際上我會用到的 plugin 也就少數的特定幾個而已。是時候該讓 omz 退休,換上其他更有效率的 framework。 ...

26 May 2024 · 2 min · nyo

把 CLI 的色彩主題換成 Catppuccin

最近發現了一個有趣的東西,名為「Catppuccin」的色彩主題 (themes)。 https://github.com/catppuccin/catppuccin Catppuccin 的配色看起來十分柔和,提供了一個亮色跟三個暗色共四種配色: Latte Frappé Macchiato Mocha 比較誇張的是這個色彩主題支援的包山包海的應用程式跟網站。 我這次打算換成次暗的 Macchiato,以下記錄我這次安裝的設定。 ...

19 May 2024 · 1 min · nyo

最快速的 Terminal Emulator

發現了使用 GPU 的 terminal emulator https://github.com/alacritty/alacritty https://sw.kovidgoyal.net/kitty/ 我目前幾乎所有的工作都在 terminal 上處理,無法接太慢的 terminal 程式 兩個都試用了一下,決定先以 alacritty 當主力試試 特色: 目前最快的 terminal emulator 使用 GPU 支援 Linux, BSD, macOS, Windows rust 開發 安裝 Debian / Ubuntu 1 $ apt install alacritty macOS 1 $ brew cask install alacritty 設定 把 alacritty.yml 放到以下的其中的一個位置就可以生效 ...

13 March 2020 · 1 min · nyo

Bash 常用快捷鍵

記錄一些比較常用/實用(可能)的快捷鍵 控制 Ctrl+C: 中斷正在執行的程式 Ctrl+D: 結束 shell (同 exit) Ctrl+Z: 暫停正在執行的程式,放入背景 (使用 fg 可以叫回來) Ctrl+X Ctrl+E: 使用 vim 編輯 script 並一次執行 移動 Ctrl+A: 到此行最前面 (同 Home 鍵) Ctrl+E: 到此行最後面 (同 End 鍵) Alt+B: 前進一個字元 Alt+F: 後退一個字元 Ctrl+B: 前進一格 Ctrl+F: 後退一格 刪除 Ctrl+H: 移除前一個字元 (同 Backspace 鍵) Ctrl+D: 移除後一個字元 (同 Delete 鍵) Ctrl+U: 移除游標之前的所有文字 Ctrl+K: 移除游標之後的所有文字 歷史指令 Ctrl+P: 上一個指令 Ctrl+N: 下一個指令 Ctrl+R: 搜尋指令 Ctrl+R: 上一個 Ctrl+Shift+R: 下一個 Ctrl+G: 取消搜尋 畫面 Ctrl+L: 清空畫面 (同 clear) Ctrl+S: 凍結畫面輸出 Ctrl+Q: 回復畫面輸出 Reference Bash Shell 快速鍵 | Tsung’s Blog Shortcuts to move faster in Bash command line - teohm.dev The Best Keyboard Shortcuts for Bash

15 September 2019 · 1 min · nyo

在 Terminal 上的跳舞鸚鵡

用 curl 找一隻鸚鵡來跳舞 1 $ curl parrot.live 來源 curl 版: https://github.com/hugomd/parrot.live terminal 版: https://github.com/jmhobbs/terminal-parrot

16 July 2018 · 1 min · nyo