Skip to content

docs(direnv): Pass shell info to shell-hook #3569

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

gavindsouza
Copy link

Before

❯ direnv allow
direnv: loading ~/Desktop/pixi-bench-demo/.envrc
/home/gavin/Desktop/pixi-bench-demo/.pixi/envs/default/share/bash-completion/completions/git:466: compgen: command not found 
/home/gavin/Desktop/pixi-bench-demo/.pixi/envs/default/share/bash-completion/completions/git:3952: complete: command not found 
/home/gavin/Desktop/pixi-bench-demo/.pixi/envs/default/share/bash-completion/completions/git:3952: complete: command not found

After

❯ direnv allow
direnv: loading ~/Desktop/pixi-bench-demo/.envrc
~/Desktop/pixi-bench-demo ❯

### Before

❯ direnv allow
direnv: loading ~/Desktop/pixi-bench-demo/.envrc
/home/gavin/Desktop/pixi-bench-demo/.pixi/envs/default/share/bash-completion/completions/git:466: compgen: command not found
/home/gavin/Desktop/pixi-bench-demo/.pixi/envs/default/share/bash-completion/completions/git:3952: complete: command not found
/home/gavin/Desktop/pixi-bench-demo/.pixi/envs/default/share/bash-completion/completions/git:3952: complete: command not found

### After

❯ direnv allow
direnv: loading ~/Desktop/pixi-bench-demo/.envrc
~/Desktop/pixi-bench-demo ❯
@Hofer-Julian
Copy link
Contributor

I haven't had time to test it locally yet.

Before we merge this, let's make sure that:

  • this also works on Windows
  • that it behaves reasonably if $SHELL isn't set

@pavelzw
Copy link
Contributor

pavelzw commented Apr 14, 2025

this also works on Windows

i don't think we ever managed to get it to work on windows 🤔 probably because of a lack of trying, though

@ruben-arts
Copy link
Contributor

This seems indeed like a problematic issue on the auto selection, what is the shell you wanted it to find vs what did it think it was running in?

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

Successfully merging this pull request may close these issues.

4 participants