From f2adfbf27de40daada18d91706dbfbe70a60949a Mon Sep 17 00:00:00 2001 From: Julian Prein Date: Wed, 28 May 2025 11:30:21 +0200 Subject: [PATCH] zsh:conf: Set local extendedglob instead of (*) The * parameter expansion flag was only introduced in zsh-5.9. I currently use a system that still uses 5.8.1 and thus throws: conf:29: error in flags --- .config/zsh/zshrc.d/40-functions.zsh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.config/zsh/zshrc.d/40-functions.zsh b/.config/zsh/zshrc.d/40-functions.zsh index 372f69a..223230a 100644 --- a/.config/zsh/zshrc.d/40-functions.zsh +++ b/.config/zsh/zshrc.d/40-functions.zsh @@ -64,6 +64,9 @@ qr() { # Edit config file conf() { + # EXTENDED_GLOB needed for /# + emulate -L zsh -o extendedglob + local CONF_EDITOR if [[ -n "$EDITOR" ]]; then CONF_EDITOR="$EDITOR" @@ -91,8 +94,8 @@ conf() { return 1 fi - # remove trailing slashes - 1="${(*)1%%/#}" + # remove trailing slashes. needs extendedglob + 1="${1%%/#}" # search for program name in XDG_CONFIG_HOME and $HOME local CONF_DIR