Skip to content

Commit b92d846

Browse files
author
jedahan
committed
Hardcode all the functions we ship
This makes us a tiny bit more resilient against tools that like to add files in our source tree, like znap.
1 parent 689aaac commit b92d846

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

geometry.zsh

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,30 @@ typeset -gA GEOMETRY; GEOMETRY[ROOT]=${0:A:h}
1515

1616
autoload -U add-zsh-hook
1717

18-
function { local fun; for fun ("${GEOMETRY[ROOT]}"/functions/*) . $fun }
18+
function {
19+
local fun
20+
for fun (
21+
geometry_docker_machine \
22+
geometry_echo \
23+
geometry_exec_time \
24+
geometry_exitcode \
25+
geometry_git \
26+
geometry_hg \
27+
geometry_hostname \
28+
geometry_jj \
29+
geometry_jobs \
30+
geometry_kube \
31+
geometry_newline \
32+
geometry_node \
33+
geometry_npm_package_version \
34+
geometry_path \
35+
geometry_ruby \
36+
geometry_rust_version \
37+
geometry_rustup \
38+
geometry_status \
39+
geometry_virtualenv \
40+
) . "${GEOMETRY[ROOT]}"/functions/$fun
41+
}
1942

2043
(( $+functions[ansi] )) || ansi() { (($# - 2)) || echo -n "%F{$1}$2%f"; }
2144
(( $+functions[deansi] )) || deansi() { (($# - 1)) || echo -n "$(echo "$1" | sed s/$(echo "\033")\\\[\[0-9\]\\\{1,2\\\}m//g)"; }

0 commit comments

Comments
 (0)