Open Firef0x opened 9 years ago
ハイ、こんにちわ! 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")
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 !
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
}
}
}
}
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. ─=≡Σ((( つ•̀ω•́)つ
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
:question: :grey_question: :question:
Or this is really a bug in this project :u6709: :bug: :question: :grey_question:
Hope for your reply !
Yours sincerely
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,
https://github.com/hchbaw/auto-fu.zsh/blob/42dbef5da89360f132cce010004d4c674a13c951/auto-fu.zsh#L1461
I suspect that above line may have afu-zle-aysce-install
somehow.
https://github.com/hchbaw/auto-fu.zsh/blob/42dbef5da89360f132cce010004d4c674a13c951/auto-fu.zsh#L1461 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. :confused:
Hope for your reply !
Yours sincerely
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 setopt
s at auto-fu-zcompile
ing:
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.
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
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.
Okey-dokey! I get it! I'll keep this issue open.
どうもありがとうございます !
Yours sincerely
こんにちわ~~ @hchbaw 君
The following error are showing up alternately every time I start a new terminal.
and
A bit similar to issue https://github.com/hchbaw/auto-fu.zsh/issues/22 from @joe9 , but I think it's better to make a new issue to report it.
What's more, the following command just outputs a blank line.
How could I fix the error message?
Hope for your reply !!! お愿いします!
FYI
auto-fu.zsh
Version: https://github.com/hchbaw/auto-fu.zsh/blob/pu/auto-fu.zsh I've zcompiledauto-fu.zsh
into~/.zsh
.zshrc
: