zsh: no matches found →
With the use of Git or Octopress (typically Rake), we type [
, ]
, ^
characters to terminal:
git reset HEAD^
rake install[classic]
Some Zsh users know what would happen when we type that commands:
zsh: no matches found: HEAD^
zsh: no matches found: install[classic]
This is caused by Zsh:
zsh allows Filename Generation and Pattern Matching (Globbing) using square brackets and other characters (explained in the zsh guide, section 5.9).
The solution is simple:
The solution, found in the zsh FAQ (section 3.4), is simply adding a line in ~/.zshrc that disables globbing for a single command:
alias rake="noglob rake"
Aliasing git
is also useful:
alias git="noglob git"