[Git-commits] [grml/grml-etc-core] 016955: zshrc: drop 'setopt nonomatch' configuration

Michael Prokop mika at grml.org
Fri Jun 26 14:36:08 CEST 2015


  Branch: refs/heads/master
  Home:   https://github.com/grml/grml-etc-core
  Commit: 016955c64b5c7a1c90af47a1a26ffe466736a12b
      https://github.com/grml/grml-etc-core/commit/016955c64b5c7a1c90af47a1a26ffe466736a12b
  Author: Michael Prokop <mika at grml.org>
  Date:   2015-06-26 (Fri, 26 Jun 2015)

  Changed paths:
    M etc/skel/.zshrc
    M etc/zsh/zshrc

  Log Message:
  -----------
  zshrc: drop 'setopt nonomatch' configuration

This is something many experienced Zsh users sometimes complain
about for our config, so let's get this fixed.

The behaviour of 'setopt nonomatch' brings the Zsh behaviour
closer to what Bash does, though people should get used to proper
quoting and get the default Zsh behaviour also with grml-zshrc.

Short explanation for the behaviour of 'setopt nonomatch' by Frank:

| If there's no *.txt in $PWD that command line will not execute with Zsh's default behaviour. You have to quote: "*.txt"
| If there *is* a *.txt file in $PWD, the command will not work as expected: Thus quoting makes the call sane.
| nonomatch makes that expansion as it is done in bash: *.txt => No match? => insert '*.txt'

Short demonstration:

| % setopt nonomatch
| % for f in *.foo ; echo $f
| *.foo
| % setopt nomatch
| % for f in *.foo ; echo $f
| zsh: no matches found: *.foo

The setting is provided as an example in etc/skel/.zshrc now.

Signed-off-by: Michael Prokop <mika at grml.org>
Acked-By: Frank Terbeck <ft at grml.org>
Acked-By: Evgeni Golov <evgeni at grml.org>




More information about the Git-commits mailing list