GithubHelp home page GithubHelp logo

Error message: with-afu-zle-rebinding:16: command not found: afu-zle-aysce-install and with-afu-zle-rebinding:16: command not found: -zle-force-install about auto-fu.zsh HOT 11 OPEN

hchbaw avatar hchbaw commented on July 17, 2024
Error message: with-afu-zle-rebinding:16: command not found: afu-zle-aysce-install and with-afu-zle-rebinding:16: command not found: -zle-force-install

from auto-fu.zsh.

Comments (11)

hchbaw avatar hchbaw commented on July 17, 2024

ハイ、こんにちわ! Mucho gusto @Firef0x .
Thank you very much for your detailed report.

Ugh, $functions[afu-initialize-rebinds] will be empty in a zcompiled auto-fu environment.

I suspect something went wrong for generating the ~/.zsh/auto-fu file.
How about below command to zcompile auto-fu?

A=/path/to/auto-fu.zsh
(zsh -f -c "setopt extendedglob no_shwordsplit; source $A ; auto-fu-zcompile $A ~/.zsh")

from auto-fu.zsh.

Firef0x avatar Firef0x commented on July 17, 2024

Ugh, $functions[afu-initialize-rebinds] will be empty in a zcompiled auto-fu environment.

そうですね !

How about below command to zcompile auto-fu?

Here is the output:

** zcompiling auto-fu in /home/f/.zsh for a little faster startups...
+ mkdir -p /home/f/.zsh
* writing code /home/f/.zsh/auto-fu
* re-compiling /home/f/.zsh/auto-fu.zwc: succeeded
** All done.
** Please update your .zshrc to load the zcompiled file like this,
-- >8 --
## auto-fu.zsh stuff.
# source ~/codes/auto-fu.zsh/auto-fu.zsh
{ . ~/.zsh/auto-fu; auto-fu-install; }
zstyle ':auto-fu:highlight' input bold
zstyle ':auto-fu:highlight' completion fg=black,bold
zstyle ':auto-fu:highlight' completion/one fg=white,bold,underline
zstyle ':auto-fu:var' postdisplay $'\n-azfu-'
zstyle ':auto-fu:var' track-keymap-skip opp
zle-line-init () {auto-fu-init;}; zle -N zle-line-init
zle -N zle-keymap-select auto-fu-zle-keymap-select
-- 8< --

The same error message still shows after executing the command.

Hope for your reply !

from auto-fu.zsh.

hchbaw avatar hchbaw commented on July 17, 2024

Thank you very much reporting back!

Does same error still happen if your ~/.zshrc like this instead?
(This means don't use zcompiled file.)

(... other stuff)
## auto-fu.zsh stuff.
source ~/codes/auto-fu.zsh/auto-fu.zsh
# { . ~/.zsh/auto-fu; auto-fu-install; }
...

And,

Could you post some portions of ~/.zsh/auto-fu ?

I want to see with-afu-zle-rebinding function in it.
It should be something like this:

with-afu-zle-rebinding () {
    local -a restores
    {
        eval "$(afu-rebind-expand restores self-insert; afu-rebind-expand restores backward-delete-char; afu-rebind-expand restores backward-kill-word; afu-rebind-expand restores kill-line; afu-rebind-expand restores kill-whole-line; afu-rebind-expand restores kill-word; afu-rebind-expand restores magic-space; afu-rebind-expand restores yank; afu-rebind-expand restores complete-word; afu-rebind-expand restores list-choices;)"
        afu-zle-force-install () {
            zle -N self-insert self-insert-by-keymap
            zle -N backward-delete-char backward-delete-char-by-keymap
            zle -N backward-kill-word backward-kill-word-by-keymap
            zle -N kill-line kill-line-by-keymap
            zle -N kill-whole-line kill-whole-line-by-keymap
            zle -N kill-word kill-word-by-keymap
            zle -N magic-space magic-space-by-keymap
            zle -N yank yank-by-keymap
            zle -C complete-word .complete-word _main_complete
            zle -C list-choices .list-choices _main_complete
        }
        afu-zle-force-install
        {
            "$@"
        }
    } always {
        eval "function afu-zle-rebind-restore () { ${(j.;.)restores} }"
        afu-zle-rebind-restore
        $0 () {
            {
                afu-zle-force-install
                {
                    "$@"
                }
            } always {
                afu-zle-rebind-restore
            }
        }
    }
}

from auto-fu.zsh.

Firef0x avatar Firef0x commented on July 17, 2024

Does same error still happen if your ~/.zshrc like this instead?
(This means don't use zcompiled file.)

Error message still shows, but not the same. Here is the output:

afu-rh-clear-maybe:3: maximum nested function level reached
$ cd ( Then I type 'cd', and the same error message shows again immediately)
afu-rh-clear-maybe:3: maximum nested function level reached

Seems like thing's gonna be worse~~~

Could you post some portions of ~/.zsh/auto-fu ?

Here is the whole file:
https://gist.github.com/Firef0x/88c833e7590860fd53a7#file-auto-fu

I want to see with-afu-zle-rebinding function in it.
It should be something like this:

I've compared the part you mentioned, and found only one difference. It' s in https://gist.github.com/Firef0x/88c833e7590860fd53a7#file-auto-fu-L681 , which is afu-zle-aysce-install compared to afu-zle-force-install . That's all I can see.

Then I replace afu-zle-aysce-install with afu-zle-force-install, no error message is showing up this time. ─=≡Σ((( つ•̀ω•́)つ

from auto-fu.zsh.

Firef0x avatar Firef0x commented on July 17, 2024

So it means that I have to replace afu-zle-aysce-install with afu-zle-force-install every time after I zcompiled auto-fu.zsh into ~/.zsh

Or this is really a bug in this project 🈶 🐛

Hope for your reply !

Yours sincerely

from auto-fu.zsh.

hchbaw avatar hchbaw commented on July 17, 2024

I'm very sorry, it's too late.

Thank you very much for posting on https://gist.github.com/Firef0x/88c833e7590860fd53a7#file-auto-fu.

Yes. I have wanted to see this line:
https://gist.github.com/Firef0x/88c833e7590860fd53a7#file-auto-fu-L681

But I cannot figure out how this line came from…
Then, I would like to see your local auto-fu.zsh checkout,

afu-zle-force-install

I suspect that above line may have afu-zle-aysce-install somehow.

from auto-fu.zsh.

Firef0x avatar Firef0x commented on July 17, 2024

afu-zle-force-install

I suspect that above line may have afu-zle-aysce-install somehow.

I just did a clean clone to my computer, and the file auto-fu.zsh is the same as the one in https://github.com/hchbaw/auto-fu.zsh/blob/42dbef5da89360f132cce010004d4c674a13c951/auto-fu.zsh , and line 1461 is afu-zle-force-install of course.

What's more, there is no output of the command git status --short in my local clone repo. 😕

Hope for your reply !

Yours sincerely

from auto-fu.zsh.

hchbaw avatar hchbaw commented on July 17, 2024

Thank you very much for your clarifications.
I cannot find out why this aysce thing is coming.

These are quite trial and errors:
How does below snippet output, does it still output aysce?

A=/path/to/auto-fu.zsh; zsh -c "source $A; functions with-afu-zle-rebinding"

It may or may not be a configration problem,
I want to see your setopts at auto-fu-zcompileing:

 zsh -c 'zmodload zsh/parameter; for k v in ${(kv)options}; do echo $k $v; done'

What's happening in general when creating ~/.zsh/auto-fu,
I want to see the trace informations in /tmp/z.log by below command:

A=/path/to/auto-fu.zsh
(zsh -c "setopt xtrace; source $A ; auto-fu-zcompile ~/.zsh/")  > /tmp/z.log 2>&1

Sorry, these will take lots of your time.

from auto-fu.zsh.

Firef0x avatar Firef0x commented on July 17, 2024

How does below snippet output, does it still output aysce?
A=/path/to/auto-fu.zsh; zsh -c "source $A; functions with-afu-zle-rebinding"

See https://gist.github.com/Firef0x/a09d323e816005603ed6#file-output1
No aysce found in the output.

I want to see your setopts at auto-fu-zcompileing:
zsh -c 'zmodload zsh/parameter; for k v in ${(kv)options}; do echo $k $v; done'

See https://gist.github.com/Firef0x/a09d323e816005603ed6#file-output2

I want to see the trace informations in /tmp/z.log by below command:
A=/path/to/auto-fu.zsh
(zsh -c "setopt xtrace; source $A ; auto-fu-zcompile ~/.zsh/") > /tmp/z.log 2>&1

See https://gist.github.com/Firef0x/a09d323e816005603ed6#file-z-log

Hope for your reply !

Yours sincerely

from auto-fu.zsh.

hchbaw avatar hchbaw commented on July 17, 2024

See https://gist.github.com/Firef0x/a09d323e816005603ed6#file-output1
No aysce found in the output.

Thanks, I'm glad to hear this. This is very OK.

I want to see your setopts at auto-fu-zcompileing:

See https://gist.github.com/Firef0x/a09d323e816005603ed6#file-output2

This is exactly the same as mine. Thank you very much.

I want to see the trace informations in /tmp/z.log by below command:

See https://gist.github.com/Firef0x/a09d323e816005603ed6#file-z-log

After fiddling around with some paths informations in my trace output file,
% diff -u z.log′ a09d323e816005603ed6/z.log just outputs:

--- "z.log\342\200\262" 2014-10-08 20:44:03.432413089 +0900
+++ a09d323e816005603ed6/z.log  2014-10-08 20:39:24.472742730 +0900
@@ -620,7 +620,7 @@
           zle -C list-choices .list-choices _main_complete

         }
-        afu-zle-force-install
+        afu-zle-aysce-install
         { "$@" }
       } always {
         eval "function afu-zle-rebind-restore () { ${(j.;.)restores} }"

Ugh… Sorry, I have no idea…
I will fresh install this OS and see what will happen.

Sorry for the inconvenience, for now, please do below commands to zcomplie:

A=/path/to/auto-fu.zsh; (zsh -c "source $A ; auto-fu-zcompile $A ~/.zsh/ =(echo 'afu-zle-aysce-install () afu-zle-force-install;')")

Or please add below snippets in your '~/.zshrc':

afu-zle-aysce-install () afu-zle-force-install;

Thank you very much for your reports and taking lots of your time.

from auto-fu.zsh.

Firef0x avatar Firef0x commented on July 17, 2024

Okey-dokey! I get it! I'll keep this issue open.

どうもありがとうございます !

Yours sincerely

from auto-fu.zsh.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.