Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

antidote-main: command not found #158

Open
xd003 opened this issue Oct 9, 2023 · 8 comments
Open

antidote-main: command not found #158

xd003 opened this issue Oct 9, 2023 · 8 comments
Labels
cannot reproduce Cannot reproduce this issue

Comments

@xd003
Copy link

xd003 commented Oct 9, 2023

I am trying to use antidote on Termux Android with zsh. When .zshrc got sourced the very first time, antidote did pulled all the plugins correctly. But now when i am running antidote update , it outputs the error mentioned in the title. This issue doesn't happen on both of my systems running Windows & Linux using antidote. Not really sure what's causing this issue here

.zshrc -

# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.config/zsh/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
  source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi

# Set the name of the static .zsh plugins file antidote will generate.
zsh_plugins=${ZDOTDIR:-~}/.zsh_plugins.zsh

# Ensure you have a .zsh_plugins.txt file where you can add plugins.
[[ -f ${zsh_plugins:r}.txt ]] || touch ${zsh_plugins:r}.txt

# Lazy-load antidote.
fpath+=(${ZDOTDIR:-~}/.antidote)
autoload -Uz $fpath[-1]/antidote

# Generate static file in a subshell when .zsh_plugins.txt is updated.
if [[ ! $zsh_plugins -nt ${zsh_plugins:r}.txt ]]; then
  (antidote bundle <${zsh_plugins:r}.txt >|$zsh_plugins)
fi

# Source your static plugins file.
source $zsh_plugins

# Use 16 colors
export FZF_DEFAULT_OPTS='--color 16'

# To customize prompt, run `p10k configure` or edit ~/.config/zsh/.p10k.zsh.
[[ ! -f ~/.config/zsh/.p10k.zsh ]] || source ~/.config/zsh/.p10k.zsh

.zsh_plugins.txt

romkatv/powerlevel10k
ohmyzsh/ohmyzsh path:plugins/gitfast
ohmyzsh/ohmyzsh path:plugins/colored-man-pages
zimfw/fzf
zdharma-continuum/fast-syntax-highlighting

# completions
zsh-users/zsh-completions path:src kind:fpath
mattmc3/zephyr path:plugins/completion

# load last
zsh-users/zsh-autosuggestions
zsh-users/zsh-history-substring-search
❯ echo $SHELL
/data/data/com.termux/files/usr/bin/zsh
❯ zsh --version
zsh 5.9 (aarch64-unknown-linux-android)
@mattmc3
Copy link
Owner

mattmc3 commented Oct 12, 2023

Unfortunately, this isn't enough to go on to help you solve it. There's nothing preventing antidote from working on a proper Zsh install on Android, but I can't debug your setup. If you want to post your config as well as version numbers I can have a look and see if anything sticks out.

I would recommend paring down to a small simple config just to test and make sure you have everything set up properly.

@xd003
Copy link
Author

xd003 commented Oct 12, 2023

@mattmc3 i have added .zshrc and .zsh_plugins.txt in my post. Actually i am just using the very same setup from my linux system wherein it works perfectly fine hence i am pretty confused why is this issue even happening in first place. If you need anything else do let me know

@xd003
Copy link
Author

xd003 commented Oct 27, 2023

Just did a complete reinstallation of Termux and setup antidote from scratch still this error shows up. Running which antidote outputs the following if it helps

❯ which antidote
antidote () {
        0=${(%):-%x}
        (( $+functions[antidote-main] )) || source ${0:A:h}/antidote.zsh
        antidote-main "$@"
}

On my Windows machine running git bash where i don't face this issue, running the same returns the following

❯ which antidote
antidote () {
        # undefined
        builtin autoload -XUz /c/Users/Admin/.config/zsh/.antidote
}

Maybe antidote is unable to create the function properly on termux in its current state

@xd003
Copy link
Author

xd003 commented Oct 31, 2023

Hello @mattmc3
Did you got around looking at this one

@mattmc3
Copy link
Owner

mattmc3 commented Oct 31, 2023

I don't have a way to test on termux, but nothing you've posted looks out of the ordinary. You might try simplifying your config to this and see if it is working for you, and then slowly add back the parts until you find what breaks:

source ${ZDOTDIR:-~}/.antidote/antidote.zsh
antidote load

@xd003
Copy link
Author

xd003 commented Oct 31, 2023

I don't have a way to test on termux, but nothing you've posted looks out of the ordinary. You might try simplifying your config to this and see if it is working for you, and then slowly add back the parts until you find what breaks:

source ${ZDOTDIR:-~}/.antidote/antidote.zsh
antidote load

I just wiped clean my .zshrc and only having the 2 lines you mentioned, running antidote update outputs the following. The command itself seems to be working, although there's some error at the end

 u0_a472@localhost  ~  antidote update
Updating bundles...
Waiting for bundle updates to complete...
Bundle updates complete.
Updating antidote...
Antidote self-update complete.

__antidote_setup:8: no matches found: /data/data/com.termux/files/home/.config/zsh/.antidote/functions/*

@mattmc3
Copy link
Owner

mattmc3 commented Oct 31, 2023

How did you install antidote? Seems like you have an incomplete install? You should remove and re-clone:

rm -rf -- ${ZDOTDIR:-$HOME}/.antidote
git clone https://github.com/mattmc3/antidote ${ZDOTDIR:-$HOME}/.antidote

@xd003
Copy link
Author

xd003 commented Oct 31, 2023

How did you install antidote? Seems like you have an incomplete install?

git clone --depth=1 https://github.com/mattmc3/antidote.git "$HOME/.config/zsh/.antidote"

I had installed it with this command directly within my ZDOTDIR

Edit - Even after running the 2 commands you mentioned, i am still getting that same error

@mattmc3 mattmc3 added the cannot reproduce Cannot reproduce this issue label Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cannot reproduce Cannot reproduce this issue
Projects
None yet
Development

No branches or pull requests

2 participants