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

Dont run on new shell #20

Open
p1r473 opened this issue Apr 30, 2024 · 0 comments
Open

Dont run on new shell #20

p1r473 opened this issue Apr 30, 2024 · 0 comments

Comments

@p1r473
Copy link

p1r473 commented Apr 30, 2024

hey! great plugin. but a problem with powerlevel10k: it gets an error that something printed during login
image

Define a new variable at the start of your script to track the initialization status. Set this variable initially to false:
AUTO_LS_INIT_COMPLETE=false
At the end of your .zshrc or after all initialization scripts, set this variable to true to indicate that the shell is fully initialized:
AUTO_LS_INIT_COMPLETE=true
Modify the auto-ls function to check this variable before executing:

auto-ls () {
  if [[ $AUTO_LS_INIT_COMPLETE == false ]]; then
    return
  fi
  # Existing auto-ls code...
}

This modification ensures that the auto-ls function will only execute after your shell is fully initialized and the AUTO_LS_INIT_COMPLETE variable is set to true.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant