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

Allow init --skip-env and --only-env #2371

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Aug 26, 2024

  1. Allow init --skip-env and --only-env

    In (some?) shells, it's sometimes preferable to set up env vars in a
    different place than other configuration like most of what `atuin init`
    sets up. For example, ZSH reads ~/.zshenv for all shells while ~/.zshrc
    is only read for interactive shells.
    
    This allows splitting the output of init such that in these two
    different config files we could load environment variables and load all
    other config seperately:
    
    ~/.zshenv:
    
        eval "$(atuin init zsh --env-only)"
    
    ~/.zshrc:
    
        eval "$(atuin init zsh --skip-env --disable-up-arrow)"
    
    Which means that when launching noninteractive shells (I do this
    frequently for running tests from Vim, for example, but it's more
    generally useful) the specified env values will be sourced and we won't
    redefine them in login shells.
    calebhearth committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    a2e18a0 View commit details
    Browse the repository at this point in the history