Expansion and Globbing

bad_pattern

  • if a pattern or glob is badly formed, print out an error

brace_ccl

  • See:
zsh% setopt no_brace_ccl
zsh% print {abc.}file
{abc.}file
zsh% setopt brace_ccl
zsh% print {abc.}file
.file afile bfile cfile

equals

  • the mighty =command expansion; try: print =emacs (if you've emacs installed)

extended_glob

  • of course, you want zsh's extended globbing features… Set this one, Luke!
  • "thou shalt always setopt extendedglob, and ye shall be saved much misery" (teratorn in #zsh, ca. 2007)

glob_dots

  • don't require a leading dot for matching "hidden" files

glob_subst

  • foo="*"; print $foo will print all files

case_glob

  • be case sensitive when globbing

nullglob

  • is a glob does not return matches, remove the glob from the argumentlist instead of reporting an error

failed pattern matches

There are several options that affect zsh's behavior when a pattern doesn't produce any filenames. They are summarized in this table, taken from From Bash to Z Shell, p. 212.

% ls
file1.h file1.c
option echo file1.* file2.* echo file2.*
default error error
no_nomatch file1.c file1.h file2.* file2.*
csh_null_glob file1.c file1.h error
null_glob file1.c file1.h empty argument list
 
options/expn.txt · Last modified: 2010/01/05 09:20 (external edit)