From 2c8b272ad64b99f9c07f051be6e0ac8375dd9318 Mon Sep 17 00:00:00 2001 From: Cameron Eagans Date: Tue, 19 Dec 2023 12:05:03 -0700 Subject: [PATCH] Add compatibility with znap --- geometry.zsh | 2 +- readme.md | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/geometry.zsh b/geometry.zsh index 0b87be4..d90fe75 100644 --- a/geometry.zsh +++ b/geometry.zsh @@ -15,7 +15,7 @@ typeset -gA GEOMETRY; GEOMETRY[ROOT]=${0:A:h} autoload -U add-zsh-hook -function { local fun; for fun ("${GEOMETRY[ROOT]}"/functions/*) . $fun } +() { setopt localoptions extendedglob; for fun ("$GEOMETRY[ROOT]"/functions/^*.zwc) . $fun } (( $+functions[ansi] )) || ansi() { (($# - 2)) || echo -n "%F{$1}$2%f"; } (( $+functions[deansi] )) || deansi() { (($# - 1)) || echo -n "$(echo "$1" | sed s/$(echo "\033")\\\[\[0-9\]\\\{1,2\\\}m//g)"; } diff --git a/readme.md b/readme.md index be13a2d..c8758cc 100644 --- a/readme.md +++ b/readme.md @@ -36,6 +36,7 @@ tool | add to `.zshrc` --------------|-------------------------------------- [zr][] | `zr geometry-zsh/geometry` [zplug][] | `zplug "geometry-zsh/geometry"` +[znap][] | `znap prompt geometry-zsh/geometry` [antigen][] | `antigen theme geometry-zsh/geometry` [Homebrew][] | `brew install geometry` **manually** | `source geometry/geometry.zsh` (after `git clone https://github.com/geometry-zsh/geometry`) @@ -142,6 +143,7 @@ A big thank you to the dozens of [additional contributors](https://github.com/ge [functions wiki page]: https://github.com/geometry-zsh/geometry/wiki/functions [open an issue]: https://github.com/geometry-zsh/geometry/issues/new +[znap]: https://github.com/marlonrichert/zsh-snap [zr]: https://github.com/jedahan/zr [zplug]: https://github.com/zplug/zplug [antigen]: https://github.com/zsh-users/antigen