Closed balta2ar closed 1 year ago
I presume you have set -u
somewhere in your zsh configuration. You probably shouldn't do it (http://mywiki.wooledge.org/BashFAQ/112), but I updated the code so that it doesn't terminate the process even when it's set.
I dind't have set -u
in my zshrc, at least not explicitly. I tried doing this:
set +u
set -x
source $HOME/rc.arch/bz/thirdparty/fzf-git.sh/fzf-git.sh
set +x
and I got:
+/home/user/.zshrc:665> source /home/user/rc.arch/bz/thirdparty/fzf-git.sh/fzf-git.sh
+/home/user/rc.arch/bz/thirdparty/fzf-git.sh/fzf-git.sh:23> [[ 1 -eq 1 ]]
+/home/user/rc.arch/bz/thirdparty/fzf-git.sh/fzf-git.sh:33> case nobeep (branches)
+/home/user/rc.arch/bz/thirdparty/fzf-git.sh/fzf-git.sh:33> case nobeep (all-branches)
+/home/user/rc.arch/bz/thirdparty/fzf-git.sh/fzf-git.sh:33> case nobeep (refs)
+/home/user/rc.arch/bz/thirdparty/fzf-git.sh/fzf-git.sh:33> case nobeep (all-refs)
+/home/user/rc.arch/bz/thirdparty/fzf-git.sh/fzf-git.sh:33> case nobeep (*)
+/home/user/rc.arch/bz/thirdparty/fzf-git.sh/fzf-git.sh:50> exit 1
and then I added echo
here (line 33):
echo "$#, $*, $1"
case "$1" in
and then I got:
+/home/username/rc.arch/bz/thirdparty/fzf-git.sh/fzf-git.sh:33> echo '1, nobeep, nobeep'
1, nobeep, nobeep
does that help?
Why is nobeep
in the argument list? What is that? Did you redefine source
? Is it an alias or something? (type source
)
no, nothing that I'm aware of:
$ type source
source is a shell builtin
I had this up above the fzf-git part in the zshrc:
unset beep
set nobeep
commenting it out helped, fzf-git started working then.
Okay, I do not understand why zsh is pushing nobeep
into $@
, but I can reproduce the situation.
If I put:
I can't even open a shell because it exist immediately:
but it works with bash. my versions: