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

Load Bashlog Conditionally #229

Open
Zordrak opened this issue Jan 30, 2021 · 3 comments
Open

Load Bashlog Conditionally #229

Zordrak opened this issue Jan 30, 2021 · 3 comments
Assignees

Comments

@Zordrak
Copy link
Collaborator

Zordrak commented Jan 30, 2021

Bashlog is slow and intensive and not always wanted.

When in an interactive shell, load it by default.
When in a non-interactive shell, do not load it by default.

Add a shell variable to explicitly load or unload it.

When not loaded, the following log function or equivalent will need to be declared instead:

log () {
  [ "${1}" == "debug" ] || echo -e "${@:2}";
}
export -f log;

@anthraxx FYI this is next up on my list for a v3 release (being potentially backwards-breaking) - when I get a chance. I welcome someone else doing the legwork. It's a simple enough change, but warrants some testing and assurance, esp where testing for invocation from an interactive parent shell.

@Zordrak
Copy link
Collaborator Author

Zordrak commented Feb 6, 2021

Feature needed to resolve #196

@Zordrak Zordrak self-assigned this Feb 6, 2021
@RoryKiefer
Copy link

Im getting bitten badly by this issue too - any chance you could merge in the BASHLOG_DISABLE thing?

@reegnz
Copy link
Contributor

reegnz commented Jul 18, 2022

FYI this is fixed now in https://github.com/tfutils/tfenv/releases/tag/v3.0.0

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

No branches or pull requests

3 participants