-
Choosing a Shell Application
- iterm2
- vscode 自带
Installing Your Unix Shell: zsh
- Zsh Installation:
brew install zsh zsh-completions
- Verify installation:
zsh --version
- Make zsh your system’s default shell:
chsh -s $(which zsh)
- Verify that it worked:
echo $SHELL
Choosing a Framework :oh-my-zsh And Config
plugins
- git
- npm
- autojump
- zsh-autosuggestions
- zsh-syntax-highlighting
- extract
themes
- ZSH_THEME=”spaceship”
- ZSH_THEME=”powerlevel9k/powerlevel9k”
alias
- alias gs=”git status”
zsh cheat sheet
exec | zsh Apply changes made to zshrc |
tabs | Create a new tab in the current directory (macOS - requires enabling access for assistive devices under - System Preferences). |
take | Create a new directory and change to it, will create intermediate directories as required. |
.. | cd .. |
… | cd ../.. |
…. | cd ../../.. |
….. | cd ../../../.. |
l | ls -lah |
la | ls -lAh |
ll | ls -lh |
/ | cd / |
~ | cd ~ |
md | mkdir -p |
rd | rmdir |
d | dirs -v (lists last used directories) |
alias | list all aliases |
x / extract | Extract an archive (supported types: tar.{bz2,gz,xz,lzma}, bz2, rar, gz, tar, tbz2, tgz, zip, Z, 7z). |
zsh_stats | Get a list of the top 20 commands and how many times they have been run. |
upgrade_oh_my_zsh | Upgrade Oh-my-zsh. |
uninstall_oh_my_zsh | Uninstall Oh-my-zsh. |
- 输入 grep 然后用上下箭头可以翻阅你执行过的所有 grep 命令
- 目录浏览和跳转:输入 d,即可列出你在这个会话里访问的目录列表,输入列表前的序号,即可直接跳转