From d7c9bda8a737b3d130a3b9834851bad496bc493a Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Thu, 22 Sep 2022 03:02:24 +0200 Subject: [PATCH] zsh:options: Enable `CSH_NULL_GLOB` Error only if all patterns of a command have no matches. --- .config/zsh/zshrc.d/10-options.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.config/zsh/zshrc.d/10-options.zsh b/.config/zsh/zshrc.d/10-options.zsh index c912076..1b65b8a 100644 --- a/.config/zsh/zshrc.d/10-options.zsh +++ b/.config/zsh/zshrc.d/10-options.zsh @@ -81,6 +81,11 @@ if [[ $OSTYPE != linux-android ]]; then setopt NO_CASE_GLOB fi + # If a pattern for filename generation has no matches, delete the pattern + # from the argument list; do not report an error unless all the patterns in + # a command have no matches. Overrides NOMATCH. + setopt CSH_NULL_GLOB + # Treat the `#', `~' and `^' characters as part of patterns for filename # generation, etc. (An initial unquoted `~' always produces named directory # expansion.)