geometry-zsh / geometry

geometry is a minimal, fully customizable and composable zsh prompt theme
ISC License
921 stars 94 forks source link

zwc parsing errors with ignore_braces / ignore_close_braces #239

Closed psprint closed 4 years ago

psprint commented 5 years ago

After I invoke git checkout info-command, then find . -iname '*.zwc' -exec rm -f \{\} \;, then I get error:

READY > (eval):1: command not found: prompt_geometry_render

("READY >" is my prompt). Then, if I run the prompt second time, I get many errors:

READY > [8] 75307
/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_docker_machine.zwc:1: no matches found: ^G^F^E^D^@\M-8^A^@5.6.2-dev-1^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@*^@^@^@^N^A^@^@^@^@^@^@h^@^@^@^^^@^@^@^\^A^@^@/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_docker_machine^@*A\M-F^@^@^D^@^@^@\M-K^B^@^@^A^@^@^@^@^@^@^@^X^@^@^@\M-^N^@^@^@^@^@^@^@A^@^@^@B^N^@^@^B^@^@^@\M-R^M^@^@^A^@^@^@^B^L^@^@\M-^C^@^@^@
[9] 75308

[8]  - exit 1
READY > /Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_docker_machine.zwc:1: no matches found: ^@^@^@T^@^@^@A^B^@^@^B^T^@^@^C^A^@^@f^@^@^@p^@^@^@\M-^E^@^@^@!^A^@^@^@^@^@^@^@^@^@^@geometry_docker_machine^@\M-^EDOCKER_MACHINE_NAME^@return^@ansi^@\M-^E\M-^OGEOMETRY_DOCKER_MACHINE_COLOR:\M-^Mblue\M-^P^@\M-^^(\M-^L\M-^OGEOMETRY_DOCKER_MACHINE_SYMBOL:=\M-^^\u20fa\M-^C\M-3\M-^^\M-^P \M-^L\M-^ODOCKER_MACHINE_NAME\M-^P)\M-^^^@^@^@^D^E^F^G^B\M-8^A^@5.6.2-dev-1^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@*^@^@^A^N^@^@^@^@^@^@^@h^@^@^@^^^@^@^A^\/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_docker_machine^@^@^@^@\M-FA^@^@^@^D^@^@^B\M-K^@^@^@^A^@^@^@^@^@^@^@^X^@^@^@\M-^N^@^@^@^@^@^@^@A^@^@^NB^@^@^@^B^@^@^M\M-R^@^@^@^A^@^@^L^B^@^@^@\M-^C^@^@^@

/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_docker_machine.zwc:1: no matches found: ^@^@^@T^@^@^BA^@^@^T^B^@^@^A^C^@^@^@f^@^@^@p^@^@^@\M-^E^@^@^A!^@^@^@^@^@^@^@^@geometry_docker_machine^@\M-^EDOCKER_MACHINE_NAME^@return^@ansi^@\M-^E\M-^OGEOMETRY_DOCKER_MACHINE_COLOR:\M-^Mblue\M-^P^@\M-^^(\M-^L\M-^OGEOMETRY_DOCKER_MACHINE_SYMBOL:=\M-^^\u20fa\M-^C\M-3\M-^^\M-^P \M-^L\M-^ODOCKER_MACHINE_NAME\M-^P)\M-^^^@^@^@
[9]  + exit 1
READY >
/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_exec_time.zwc:1: parse error near `)'
[8] 75309
/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_git.zwc:1: command not found: ^G^F^E^D^A
/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_git.zwc:1: permission denied:
/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_git.zwc:1: permission denied:
[8]  + exit 127
/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_git.zwc:1: command too long: ^L^@^@^C^@^@}^@^@^@^@^@^@^@A,^@^@^B^@^@^@^E^@^@^@^@^@^@^@!^@^@^@^F^@^@^@A^@^@^@B^N^@^@^C^@^@^@\M-^R^L^@^@\M-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^@^@^@"^N^@^@^D^@^@^@\M-R^M^@^@\M-I^@^@^@^B^L^@^@^C^A^@^@&^@^@^@\M-|^@^@^@A^@^@^@^B^T^@^@\M-^C^A^@^@f^@^@^@^X^A^@^@ی^C^@1^A^@^@A^@^@^@^B^\^@^@^C^B^@^@^@^@^@\M-4^A^@^@^A^@^@^@^E^@^@^@\M-L^A^@^@\M-e^A^@^@A^@^@^@^N^@^@\t^@^@^@^S^@^@^@^A^B^@^@^B^V^@^@\t^@^@^@^E^@^@^@\M-L^A^@^@=^B^@^@^F^@^@^@A^@^@^@^N^@^@
READY > /Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_git.zwc:2: permission denied:
[8] 75314
[9] 75315
/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_git.zwc:3: permission denied:

[8]  - exit 126
/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_git.zwc:3: permission denied:
READY >
[9]  + exit 126
READY > /Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_git.zwc:3: permission denied:

/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_git.zwc:4: parse error near `)'
/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_hg.zwc:1: unmatched '
/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_hostname.zwc:1: parse error near `)'
/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_jobs.zwc:1: bad pattern: ^G^F^E^D^@D^A^@5.6.2-dev-1^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@(^@^@^@\M-#^@^@^@^@^@^@^@D^@^@^@^\^@^@^@^\^A^@^@/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_jobs^@(^@^@A~^@^@^D^@^@^@\M-+^A^@^@^A^@^@^@^@^@^@^@^N^@^@^@Q^@^@
^@^@^@^@^@A^B^@^@^B^T^@^@C^@^@^@f^@^@^@^@^@^@^@^U^@^@^@\M-\t^@^@^@^@^@^@^@^@^@^@^@geometry_jobs^@ansi^@\M-^E\M-^OGEOMETRY_JOBS_COLOR:\M-^Mblue\M-^P^@\M-^]%(1j.\M-^]\M-^E\M-^OGEOMETRY_JOBS_SYMBOL:\M-^M\M-^^\u20fa\M-^C\M-9\M-^^\M-^P\M-^] %j.)\M-^]^@^@^D^E^F^G^BD^A^@5.6.2-dev-1^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@(^@^@^@\M-#^@^@^@^@^@^@^@D^@^@^@^\^@^@^A^\/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_jobs^@^@^@^@^@^@~A^@^@^@^D^@^@^A\M-+^@^@^@^A^@^@^@^@^@^@^@^N^@^@^@Q^@^@^@^@^@^@^BA^@^@^T^B^@^@^@C^@^@^@f^@^@^@^@^@^@^@^U^@^@^@\M-\t^@^@^@^@^@^@^@^@geometry_jobs^@ansi^@\M-^E\M-^OGEOMETRY_JOBS_COLOR:\M-^Mblue\M-^P^@\M-^]%(1j.\M-^]\M-^E\M-^OGEOMETRY_JOBS_SYMBOL:\M-^M\M-^^\u20fa\M-^C\M-9\M-^^\M-^P\M-^] %j.)\M-^]^@^@
[8] 75317
/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_kube.zwc:1: bad pattern: ^G^F^E^D^@\M-L^C^@5.6.2-dev-1^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@(^@^@^@*^C^@^@^@^@^@^@4^A^@^@^\^@^@^@^\^A^@^@/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_kube^@(^@^@A^@^@^@B^N^@^@^D^@^@^@^S^@^@^@^A^@^@^@^B^L^@^@^C^A^@^@
[9] 75318
/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_kube.zwc:1: permission denied:
[8]  - exit 1
READY > /Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_kube.zwc:1: no matches found: \M-^L+commands[kubectl]

[9]  + exit 126
READY >
/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_node.zwc:1: parse error near `)'
/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_path.zwc:1: unmatched "
[8] 75320
/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_ruby.zwc:1: bad pattern: ^G^F^E^D^@\M-D^C^@5.6.2-dev-1^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@(^@^@^@!^C^@^@^@^@^@^@x^A^@^@^\^@^@^@^\^A^@^@/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_ruby^@(^@^@A^@^@^@B^N^@^@^D^@^@^@^S^@^@^@^A^@^@^@^B^L^@^@^C^A^@^@
[8]  + exit 1
READY > /Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_ruby.zwc:1: permission denied:
/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_ruby.zwc:2: no matches found: ^@^@^A^@^@^@h^@^@^@(^@^@^@\M-^A^A^@^@^@^@^@^@A,^@^@^B^@^@^@^E^@^@^@^@^@^@^@9^@^@^@^F^@^@^@A$^@^@^D^@^@^@2^B^@^@U^A^@^@\M-^A^A^@^@A^@^@^@^B^\^@^@C^A^@^@^@^@^@\M-\^A^@^@^A^@^@^@^E^@^@^@\M-t^A^@^@)^B^@^@A^@^@^@"^N^@^@^G^@^@^@^S^@^@^@Q^B^@^@^B\M-(^@^@\M-C^A^@^@\t^E^@^@^@^@^@^@A$^@^@^H^@^@^@2^B^@^@\M-^Y^B^@^@\M-A^B^@^@A^@^@^@^B^\^@^@C^B^@^@^@^@^@\M-\^A^@^@^A^@^@^@^E^@^@^@^X^C^@^@)^B^@^@A^B^@^@^N^@^@^L^@^@^@^S^@^@^@I^C^@^@^BH^@^@^C^C^@^@\t^B^@^@^@^@^@^@A$^@^@^M^@^@^@2^B^@^@\M-m^C^@^@)^D^@^@A^B^@^@^B^\^@^@\M-^C^C^@^@'^@^@^@\M-\^A^@^@^A^@^@^@^E^@^@^@|^D^@^@\M-^Y^D^@^@^@^@^@^@^@^@^@^@A^B^@^@^B^T^@^@\M-^C^D^@^@f^@^@^@\M-t^D^@^@\M-[t^C^@\t^E^@^@^@^@^@^@^@^@^@^@ \M-^L+commands[ruby] ^@return^@geometry_ruby^@GEOMETRY_RUBY^@\M-^E\M-^Hansi white \u20f7\M-^C\M-&\M-\n^@\M-^E\M-^Hruby -v\M-\n^@\M-^]ruby ([0-9a-zA-Z.]+)\M-^]^@local^@ruby_version^@\M-^Ematch\M-^Q1\M-^R^@ \M-^L+commands[rvm] ^@\M-^E\M-^Hrvm -v\M-\n^@\M-^]rvm ([0-9a-zA-Z.]+)\M-^]^@rvm_version^@ \M-^L\M-^OGEOMETRY_RUBY_RVM_SHOW_GEMSET:=true\M-^P ^@\M-^E\M-^Hrvm current\M-\n^@\M-^]ruby-[0-9.]+@?(.*)\M-^]^@gemset^@\M-^E\M-^Omatch\M-^Q1\M-^R:\M-^[\M-^^default\M-^^\M-^P^@echo^@\M-^^\M-^L\M-^O(j: :):-\M-^LGEOMETRY_RUBY \M-^Lruby_version \M-^Lrvm_version \M-^Lgemset\M-^P\M-^^^@\M-^C \M-^C^D^E^F^G^B\M-D^C^@5.6.2-dev-1^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@(^@^@^C!^@^@^@^@^@^@^Ax^@^@^@^\^@^@^A^\/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_ruby^@^@^@^@^@^@^@A^@^@^NB^@^@^@^D^@^@^@^S^@^@^@^A^@^@^L^B^@^@^A^C^@^@^@&^@^@^@L^@^B\M-^^A^@^@^@^F^@^@\n+^@^@^@^A^@^@^@h^@^@^@(^@^@^A\M-^A^@^@^@^@^@^@,A^@^@^@^B^@^@^@^E^@^@^@^@^@^@^@9^@^@^@^F^@^@^@^@^@^D^@^@^B2^@^@^AU^@^@^A\M-^A^@^@^@A^@^@^\^B^@^@^AC^@^@^@'^@^@^A\M-\^@^@^@^A^@^@^@^E^@^@^A\M-t^@^@^B)^@^@^@A^@^@^N^@^@^@^G^@^@^@^S^@^@^BQ^@^@\M-(^B^@^@^A\M-C^@^@^E
/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_ruby.zwc:3: no matches found: \M-^L+commands[ruby]

/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_rustup.zwc:1: parse error near `)'
/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_status.zwc:1: bad pattern: ^G^F^E^D^@0^E^@5.6.2-dev-1^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@(^@^@^@\M-^O^D^@^@^@^@^@^@p^B^@^@^\^@^@^@^\^A^@^@/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_status^@(A\M-V^D^@^D^@^@^@^K^S^@^@^A^@^@^@^@^@^@^@^P^@^@^@^O^B^@^@^B^@^@^@A^@^@^@^B^P^@^@\M-^C^@^@^@F^@^@^@\M-R^A^@^@^A^@^@^@A^@^@^@^B^P^@^@\M-C^@^@^@F^@^@^@\M-R^A^@^@\M-^A^@^@^@A^@^@^@^B^P^@^@^C^A^@^@F^@^@^@\M-R^A^@^@^M^A^@^@A^@^@^@^B^P^@^@C^A^@^@F^@^@^@\M-R^A^@^@\M-^M^A^@^@A^@^@^@^B^P^@^@\M-^C^A^@^@F^@^@^@\M-R^A^@^@%^B^@^@A^@^@^@^B^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_STATUS_COLOR_ROOT:\M-^Mred\M-^P^@\M-^E\M-^OGEOMETRY_STATUS_SYMBOL:\M-^M\u20f6\M-2\M-^P^@\M-^E\M-^OGEOMETRY_STATUS_SYMBOL_ERROR:\M-^M\u20f6\M-3\M-^P^@\M-^E\M-^OGEOMETRY_STATUS_SYMBOL_ROOT:\M-^M\u20f6\M-<\M-^P^@\M-^E\M-^OGEOMETRY_STATUS_SYMBOL_ROOT_ERROR:\M-^M\u20f6\M-=\M-^P^@ \M-^L\M-^OGEOMETRY_STATUS_SYMBOL_COLOR_HASH:=false\M-^P ^@local^@colors^@\M-^O1..9\M-^P^@\M-^L\M-^Hechotc Co\M-\n == 256^@\M-^O17..230\M-^P^@\M-^E\M-^O\M-^Hs::\M-\n\M-^FHOST\M-^P^@sum += \M-^L\M-^Hprint -f '%d' $c"\M-\n^@GEOMETRY_STATUS_COLOR^@\M-^E\M-^Ocolors\M-^Q\M-^E\M-\t(\M-^Lsum % \M-^L\M-^O#colors\M-^P)\M-^K\M-^R\M-^P^@color^@symbol^@GEOMETRY_STATUS_SYMBOL^@\M-^EUID^@\M-^EEUID^@_ROOT^@ \M-^LGEOMETRY_LAST_STATUS ^@_ERROR^@ansi^@\M-^E\M-^O\M-^HP\M-\ncolor\M-^P^@\M-^E\M-^O\M-^HP\M-\nsymbol\M-^P^@\M-x^D^E^F^G^B0^E^@5.6.2-dev-1^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@(^@^@^D\M-^O^@^@^@^@^@^@^Bp^@^@^@^\^@^@^A^\/Users/sgniazdowski/.zplugin/plugins/geometry-zsh---geometry/functions/geometry_status^@^@^@^D\M-VA^@^@^@^D^@^@^S^K^@^@^@^A^@^@^@^@^@^@^@^P^@^@^B^O^@^@^@^B^@^@^@A^@^@^P^B^@^@^@\M-^C^@^@^@F^@^@^A\M-R^@^@^@^A^@^@^@A^@^@^P^B^@^@^@\M-C^@^@^@F^@^@^A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^@^@E^@^@^F\M-^L^@^@^G\M-(^@^@^@^F^@^@^BA^@^@^T^B^@^@^E\M-C^@^@^@f^@^@^G\M-D^@^@^G\M-Y^@^@^H\t^@^@^@^@^@^@^@^@geometry_status^@\M-^E\M-^OGEOMETRY_STATUS_COLOR:\M-^Mwhite\M-^P^@\M-^E\M-^OGEOMETRY_STATUS_COLOR_ROOT:\M-^Mred\M-^P^@\M-^E\M-^OGEOMETRY_STATUS_SYMBOL:\M-^M\u20f6\M-2\M-^P^@\M-^E\M-^OGEOMETRY_STATUS_SYMBOL_ERROR:\M-^M\u20f6\M-3\M-^P^@\M-^E\M-^OGEOMETRY_STATUS_SYMBOL_ROOT:\M-^M\u20f6\M-<\M-^P^@\M-^E\M-^OGEOMETRY_STATUS_SYMBOL_ROOT_ERROR:\M-^M\u20f6\M-=\M-^P^@ \M-^L\M-^OGEOMETRY_STATUS_SYMBOL_COLOR_HASH:=false\M-^P ^@local^@colors^@\M-^O1..9\M-^P^@\M-^L\M-^Hechotc Co\M-\n == 256^@\M-^O17..230\M-^P^@\M-^E\M-^O\M-^Hs::\M-\n\M-^FHOST\M-^P^@sum += \M-^L\M-^Hprint -f %d '\M-\n^@GEOMETRY_STATUS_COLOR^@\M-^E\M-^Ocolors\M-^Q\M-^E\M-\t(\M-^Lsum % \M-^L\M-^O#colors\M-^P)\M-^K\M-^R\M-^P^@color^@symbol^@GEOMETRY_STATUS_SYMBOL^@\M-^EUID^@\M-^EEUID^@_ROOT^@ \M-^LGEOMETRY_LAST_STATUS ^@_ERROR^@ansi^@\M-^E\M-^O\M-^HP\M-\ncolor\M-^P^@\M-^E\M-^O\M-^HP\M-\nsymbol\M-^P^@\M-x
READY > (eval):1: command not found: prompt_geometry_render

What happens before 1st and 2nd run is that zplugin binary module automatically compiles any source'd file. So each of geometry's components gains a .zwc file.

After those errors, if I invoke READY > cd .., I can see the prompt rendered (has a blue color for path, doesn't it). Entering a git repo triggers RPROMPT also correctly.

If I starth zsh without zplugin-module, and then remove the zwc files and compile everything manually via:

arr=(                                                     info-command :: 12d :: ⬡
async.zsh.zwc
functions/geometry_docker_machine.zwc
functions/geometry_exec_time.zwc
functions/geometry_git.zwc
functions/geometry_hg.zwc
functions/geometry_hostname.zwc
functions/geometry_jobs.zwc
functions/geometry_kube.zwc
functions/geometry_node.zwc
functions/geometry_path.zwc
functions/geometry_ruby.zwc
functions/geometry_rustup.zwc
functions/geometry_status.zwc
functions/geometry_virtualenv.zwc
geometry.plugin.zsh.zwc
)
for file in "${arr[@]}"; do rm -f "$file"; zcompile "$file:r"; done

then the problem still persists. What can be wrong?

jedahan commented 5 years ago

Can you try this on https://github.com/jedahan/geometry/tree/mnml ? I'm going to delete the info-command branch as it is out of date

psprint commented 5 years ago

It gives the same errors. Have you maybe started to use short_loops in the branch?

psprint commented 5 years ago

You can check if it reproduces for you – following will compile all files that zplugin-module compiles, probably all that are in use by default:

all=(
./async.zsh.zwc
./functions/geometry_docker_machine.zsh.zwc
./functions/geometry_exec_time.zsh.zwc
./functions/geometry_git.zsh.zwc
./functions/geometry_hg.zsh.zwc
./functions/geometry_hostname.zsh.zwc
./functions/geometry_jobs.zsh.zwc
./functions/geometry_kube.zsh.zwc
./functions/geometry_node.zsh.zwc
./functions/geometry_path.zsh.zwc
./functions/geometry_ruby.zsh.zwc
./functions/geometry_rustup.zsh.zwc
./functions/geometry_status.zsh.zwc
./functions/geometry_virtualenv.zsh.zwc
./geometry.plugin.zsh.zwc
)
for file in ${all[@]}; do zcompile "${file:r}"; echo $file:r compiled; done
jedahan commented 5 years ago

Ahh okay, so yeah I get the same errors you do, after compiling and opening a new tab

jedahan commented 5 years ago

Can you give it a shot now?

jedahan commented 5 years ago

Also if you know a way I should be using bindkey better than just mapping '^M' I'm all ears!

psprint commented 5 years ago

It works now, cool. I have a more "private" issue thought – I simulate initial precmd call, set up with:

% grep precmd geometry.plugin.zsh
add-zsh-hook precmd geometry::clear_title
add-zsh-hook precmd geometry::prompt

I do call them in zplugin's atload'' hook:

atload.geometry:: ~/.zshrc                                            mnml 15h::⬡
zplugin ice load'![[ $MYPROMPT = 4 ]]' unload'![[ $MYPROMPT != 4 ]]' atload"geometry::clear_title; geometry::prompt" lucid # ver"mnml"

But I don't get the prompt until first command being run, like it is shown in this video:

https://asciinema.org/a/XNtEXTtNiRTNGMsvilo8X9vce

Do you maybe know what else geometry runs through some hooks, that might be causing this?

jedahan commented 5 years ago

geometry::rprompt is also run once when sourcing geometry.zsh, maybe that needs to be run?

jedahan commented 5 years ago

Did running geometry::rprompt fix things?

psprint commented 5 years ago

No, sadly no

jedahan commented 5 years ago

does it work if you manually source geometry.zsh in your zshrc instead of using zplugin? just trying to narrow down where the issue may be

psprint commented 5 years ago

Yes it worked. All this resulted in a diagnosis:

  1. I was using plugin gitlab -> zdharma/fsh-auto-themes
  2. It adds chpwd hook
  3. Normally zsh startup doesn't cause chpwd to be called, so say that "order of loaded plugins doesn't matter" (precisely: fsh-auto-themes was being loaded before zdharma/fast-syntax-highlighting, a risky act, as it depends on F-Sy-H)
  4. However geometry runs at loading (xtrace output): +geometry::wrap:3> cd /Users/sgniazdowski/.zplugin/plugins/jedahan---geometry
  5. This triggers fsh-auto-themes and is being done before loading of F-Sy-H
  6. An error in fsh-auto-themes caused the prompt to not appear until first actual command was run. Unsure why, maybe because of $? != 0?

To solve this geometry should use -q option with cd – it suppresses side-effects. I've had this situation with zplugin, and I also suppress "autopushd" option effects by:

() { setopt localoptions noautopushd; builtin cd -q "$local_dir/$dirname"; }

But a solution would also be to use pushd and then popd builtins.

I can now test the new geometry 😄

jedahan commented 5 years ago

Awesome debuggging! I pushed it to https://github.com/jedahan/geometry/commit/e7b9e87dfcdba140fb76cdf708275fdd88eb15b4

jedahan commented 5 years ago

How are things looking @psprint ? Any other bugs/questions/suggestions?

psprint commented 5 years ago

I've ran the new geometry for a few days (7-10), but switched back to normal version, because of the blue, not blue-bold for the path ;). I've also had an impression of changes in the arrangement of the information of the prompt, i.e. visual locations of the bits of information, but running the jedahan/geometry plugin now shows that there are no changes in the arrangement. Maybe the updates (I'm running zplugin update --all quite often) restored the normal-geometry visual arrangement, I don't know.

In general, I've felt bad after switching to the jedahan/geometry, because it was taking away the normal-geometry of confirmed-value... So I couldn't keep up using it for more than 7-10 days.. :unamused: I can switch now again after I'll figure out how to change the color of the path to light-blue (from blue).

jedahan commented 5 years ago

Thanks for the feedback, and giving it another try.

It sounds like there are two main issues, correct me if I am wrong:

  1. The path status color changed. Do you mean the ▲ or the actual path like ~/some/dir? The status symbol color can be set with GEOMETRY_STATUS_COLOR, and if you are on a terminal with 256 colors you can choose a number instead of a word. If this does not do what you want, what would be ideal?

  2. I am not sure what you mean, but this sounds important: normal-geometry of confirmed-value being taken away. Could you show me an example?

psprint commented 5 years ago
  1. I need to change the blue color of the path in the prompt.
  2. I cannot, because now I don't have that impression (except for the dark-blue-path) and I've forgot what it was about the time ago.
psprint commented 5 years ago

I've run zplugin report on the jedahan/geometry theme, it might be interesting to you, here's the result:

zplg-geometry-report

There's seem to be no *color* variable other than the *TIME* parameters:

zplg report jedahan/geometry | grep -i color                             master 5d::●::⬡
GEOMETRY_TIME_COLOR_SHORT    [ "" -> scalar         ]
GEOMETRY_TIME_COLOR_NEUTRAL  [ "" -> scalar         ]
GEOMETRY_TIME_COLOR_LONG     [ "" -> scalar         ]

Although some variables could be created at runtime, e.g. in precmd hook, although GEOMETRY<tab> doesn't yield any. Setting GEOMETRY_COLOR_DIR doesn't cause the current-path to change like the README says.

What is a way to configure the dir color?

jedahan commented 5 years ago

Most plugins try not to export their environment variables to help reduce pollution. From geometry_path, GEOMETRY_PATH_COLOR is the thing to be set. I will add it to the readme. Do you have suggestions on how to make it easier to find out what can be set without polluting env with hundreds of variables?

▲ echo "$functions[geometry_path]"
    local dir=${GEOMETRY_PATH_SYMBOL_HOME:="%3~"}
    (( ${GEOMETRY_PATH_SHOW_BASENAME:=false} )) && dir=${PWD:t}
    ansi ${GEOMETRY_PATH_COLOR:=blue} $dir
jedahan commented 5 years ago

I also wonder how I can hide all the _{rebase,stashes,etc} functions

psprint commented 5 years ago

Most plugins try not to export their environment variables to help reduce pollution. From geometry_path, GEOMETRY_PATH_COLOR is the thing to be set. I will add it to the readme. Do you have suggestions on how to make it easier to find out what can be set without polluting env with hundreds of variables?

Zstyles are for this. So e.g.:

# To set:
zstyle :plugin:geometry:color path_dir 131
# To read:
zstyle -s :plugin:geometry:color path_dir my_path_dir || my_path_dir="some-default-value"

I've missed the zstyle-way too, in Zsh-Navigation-Tools, there're many znt_* variables ( like:znt_list_instant_select=1 or znt_list_border=0). However, the upper-case global parameter way feels more natural.

There's no way to hide the functions. I once posted on zsh-workers mailing list about the need of namespaces for functions, but it didn't catch-on any attention and/or response.

PS: Maybe you have an idea how the functions-namespaces or functions-hiding should work? You could post to zsh-workers about this.

PS2: The good thing is that function name can consist of probably literally any ASCII character, even e.g. ], so you could namespace the function this way (so \]rebase() { echo Hello; } in the synthetic [-based example).

jedahan commented 5 years ago

Though zstyle is cool, I would rather people be able to use geometry with as few new concepts to learn as possible.

The downside of putting environment variables inside functions is they are hard to discover. I might be convinced that its better for discoverability by putting them outside functions, even if that does pollute the environment.

I think at one point there was another benefit to the environment variables being outside the functions, where you could change them on the fly and it would update everywhere, but that might not be the case now.

Regarding namespacing functions, I also think geometry:: could be fine. Right now I do like that geometry::* is "internal" functions, and geometry_blah are just default functions provided by the project, because the visual separation is nice, and people might think that :: has some special meaning when it really doesn't.

functions-hiding and functions-namespaces I think should really only exist with the same scoping rules we have for variables right now. That is, if i want to hide some internal geometry function, I should just define it within the scope of the enclosing function. Even if I have to define twice, oh well.

psprint commented 5 years ago

Yeah, the fever concepts issue, I agree. Although the nice looking of the :-separated path, i.e. ":plugin:geometry:color" might be worth adding a concept.

I've recalled one other way – a global hash. Like in Zplugin, where I use $ZPLGM, i.e. "z-plugin-map" for internal use and for user's customization. The issue – user has to adopt a skill (global hash variable definition, understanding what happens if one writes to the hash and then again calls declare -A...). However the internal-use is a nice thing. For example in fast-syntax-highlighting I'm using a global hash FAST_HIGHLIGHT for everything, like cache of available git commands, user-exposed flags (like use_async field). I've checked now and the hash has 287 keys, head of the keys list:

chroma-git-call-nr
cache-path-info-7072-born-at
cache-path-info-7814-born-at
cache-path-string-7156-born-at
cache-path-/dev/null-7822-born-at
cache-path-n-history-18
cache-path-info-7163
cache-path-0-7106-born-at
chroma-git
chroma-pip
cache-path-\=-1275
cache-path-20000-8690-born-at
cache-path-addwin-7065
ointeractive_comments
cache-path-\=-8109
jedahan commented 5 years ago

I'm going to close this issue for now, and we can investigate exposing environment variables, and renaming them in the future. Thanks for all your patience and testing @psprint!

psprint commented 5 years ago

I'm running jedahan/geometry prompt for the last 7 days and don't occur any problem. One more thing for the global-param-home-hash, I can give the key count for zplugin (as FAST_HIGHLIGH consists only from cache fields):

% print -rl -- ${#ZPLGM}
108 # (on a fresh session: 87)

% print -rl -- ${(k)ZPLGM}
col-bar
col-rst
alias-map-psprint/fsh-auto-themes
alias-map-zdharma/zsh-diff-so-fancy
alias-map-%/Users/sgniazdowski/gitlab/zsh-tag-search.git
TIME_19_iwata---git-now
WAIT_IDX
TIME_INDEX
TIME_17_psprint---vramsteg-zsh
UPAR
col-pname
TIME_22_zdharma---git-url
alias-map-Fakerr/git-recall
TIME_6_psprint---zsh-editing-workbench
SHADOWING
TIME_4_zdharma---zconvey
WAIT_ICE_10
...

So this method is really handy in having parameter-availability freedom (except for hashes & arrays, but I'm doing serialization/deserialization and store them anyway, e.g. under the key WAIT_ICE_10, there's a serialized hash stored, via the method: http://zdharma.org/Zsh-100-Commits-Club/Zsh-Native-Scripting-Handbook.html#serializing-data) and non-polluting the global namespace.

BTW. Maybe I could test some new subsystem of the new geometry or stress-test an subsystem?

jedahan commented 5 years ago

Thanks for reporting back! Glad to hear things are stable now. I really wanna coordinate a release with the rest of the team soon. Hopefully with lots of screenshots :)

The serialization/deserialization is really cool, but since geometry really does so little I can't think of what makes the most sense to hide :)

The weirdest bugs are still when rendering single-width emoji, which are really apparent in tab-complete.

Other stress tests could be zle bind conflicts, and performance issues.

And investigating replacing our custom git plugin with vcs_info (if its fast enough).

Oh any possibly replacing our use of grep/rg/ag with (m) but I don't think we need to.

psprint commented 5 years ago

Hello, I have run the zplugin-stress-test command on jedahan/geometry:

▲ ~/github/zplugin.git zplg stress jedahan/geometry                     master 1d::●::⬡
Stress-testing geometry.plugin.zsh for option NO_SHORT_LOOPS [Success]
Stress-testing geometry.plugin.zsh for option IGNORE_BRACES [Fail]
Stress-testing geometry.plugin.zsh for option IGNORE_CLOSE_BRACES [Fail]
Stress-testing geometry.plugin.zsh for option SH_GLOB [Success]
Stress-testing geometry.plugin.zsh for option CSH_JUNKIE_QUOTES [Success]
Stress-testing geometry.plugin.zsh for option NO_MULTI_FUNC_DEF [Success]```

So the plugin won't work if someone enables the two *BRACES* options. The function that does the stress test is fairly simple, I;m pasting it so that it is known that what actually happens during the tests:

    local -a ZPLG_STRESS_TEST_OPTIONS
    ZPLG_STRESS_TEST_OPTIONS=( "NO_SHORT_LOOPS" "IGNORE_BRACES" "IGNORE_CLOSE_BRACES" "SH_GLOB" "CSH_JUNKIE_QUOTES" "NO_MULTI_FUNC_DEF" )

    (
        builtin emulate -LR ksh
        builtin unsetopt shglob kshglob
        for i in "${ZPLG_STRESS_TEST_OPTIONS[@]}"; do
            builtin setopt "$i"
            builtin print -n "Stress-testing ${fname:t} for option $i "
            builtin zcompile -R "$fname" 2>/dev/null && {
                builtin print "[${ZPLGM[col-success]}Success${ZPLGM[col-rst]}]"
            } || {
                builtin print "[${ZPLGM[col-failure]}Fail${ZPLGM[col-rst]}]"
            }
            builtin unsetopt "$i"
        done
    )

The plugin gemoetry-zsh/geometry passes all the tests.

▲ ~/github/zplugin.git zplg stress geometry-zsh/geometry                     master 1d::●::⬡
Stress-testing geometry.plugin.zsh for option NO_SHORT_LOOPS [Success]
Stress-testing geometry.plugin.zsh for option IGNORE_BRACES [Success]
Stress-testing geometry.plugin.zsh for option IGNORE_CLOSE_BRACES [Success]
Stress-testing geometry.plugin.zsh for option SH_GLOB [Success]
Stress-testing geometry.plugin.zsh for option CSH_JUNKIE_QUOTES [Success]
Stress-testing geometry.plugin.zsh for option NO_MULTI_FUNC_DEF [Success]

Also, I'm using the new plugin without problems starting from the last conversation.

jedahan commented 5 years ago

I think I fixed this in the latest mnml branch.

It would be cool to add tests to either the dockerfile or somewhere else.

All I did was manually do setopt ignore_braces; zcompile -R geometry.zsh and zcompile -R functions/*zsh....

jedahan commented 5 years ago

err, the mnml branch on https://github.com/jedahan/geometry

jedahan commented 4 years ago

should be fixed

psprint commented 4 years ago

Yes I've checked, both geometry-zsh and mnml pass the stress test.