zsh - What does `(.N)` do in this extended glob? -
the prezto documentation has following example script setting symlinks:
setopt extended_glob rcfile in "${zdotdir:-$home}"/.zprezto/runcoms/^readme.md(.n); ln -s "$rcfile" "${zdotdir:-$home}/.${rcfile:t}" done i understand in "${zdotdir:-$home}"/.zprezto/runcoms/^readme.md(.n) until (.n). (.n) mean here?
bonus question, ${rcfile:t}? understand resolves name of rcfile don't know :t for.
the bellow piece denies or negates (.n) content wich starts '^' readme.md ^readme.md(.n)
the ^ symbol regular expression means beginning of something.
the ${rcfile:t} part allows name stripping dir name of string. therefore loop create needed symlink each configuration file of zpresto dir.
Comments
Post a Comment