Gary' Blog

Gary' Blog

Gary's Technical Blog

马上订阅 Gary' Blog RSS 更新: https://garymeng.com/feed/

Terminal autocomplete (only macOS and Linux)

Gary
2025年5月21日 16:37
Technical
How to Make your terminal smarter? Install Oh My ZSH! sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" Install zsh-autosuggestions and zsh-autocomplete: brew install zsh-autosuggestions zsh-completions Add following to ~/.zshrc: source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh if type brew &>/dev/null; then FPATH=$(brew --prefix)/share/zsh-completions:$FPATH autoload -Uz compinit compinit fi Force rebuild zcompdump: rm -f ~/.zcompdump; compinit Reopen the terminal, it will works.