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
This commit is contained in:
2025-05-28 11:30:21 +02:00
parent 1f80b616c2
commit f2adfbf27d

View File

@@ -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