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

Always detects fish #81

Closed
hynek opened this issue Aug 22, 2023 · 0 comments · Fixed by #83
Closed

Always detects fish #81

hynek opened this issue Aug 22, 2023 · 0 comments · Fixed by #83
Assignees

Comments

@hynek
Copy link

hynek commented Aug 22, 2023

This started happening as of 1.5.3, while it works in 1.5.0post1.

My default shell is Fish, but occasionally I run things under bash – notably PDM activation scripts under Direnv.

With 1.5.3, on both bash and zsh import shellingham; shellingham.detect_shell(), it always returns fish:

python -m venv venvvenv/bin/python -m pip install shellingham
Looking in indexes: https://pypi.vm.ag/root/vrmd/+simple/
Collecting shellingham
  Using cached https://pypi.vm.ag/root/pypi/%2Bf/419/c6a164770c9c7/shellingham-1.5.3-py2.py3-none-any.whl (9.7 kB)
Installing collected packages: shellingham
Successfully installed shellingham-1.5.3venv/bin/python -c 'import shellingham; print(shellingham.detect_shell())'
('fish', '/opt/homebrew/bin/fish')zsh
hynek@nazare tmp % venv/bin/python -c 'import shellingham; print(shellingham.detect_shell())'
('fish', '/opt/homebrew/bin/fish')
hynek@nazare tmp %

❯ bash

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
$ venv/bin/python -c 'import shellingham; print(shellingham.detect_shell())'
('fish', '/opt/homebrew/bin/fish')
$ exitvenv/bin/pip install shellingham==1.5.0.post1
Looking in indexes: https://pypi.vm.ag/root/vrmd/+simple/
Collecting shellingham==1.5.0.post1
  Using cached https://pypi.vm.ag/root/pypi/%2Bf/368/bf8c00754fd4f/shellingham-1.5.0.post1-py2.py3-none-any.whl (9.4 kB)
Installing collected packages: shellingham
  Attempting uninstall: shellingham
    Found existing installation: shellingham 1.5.3
    Uninstalling shellingham-1.5.3:
      Successfully uninstalled shellingham-1.5.3
Successfully installed shellingham-1.5.0.post1zsh
hynek@nazare tmp % venv/bin/python -c 'import shellingham; print(shellingham.detect_shell())'
('zsh', 'zsh')
hynek@nazare tmp %

❯ bash

The default interactive shell is now zsh.
To update your account to use zsh, please run `chsh -s /bin/zsh`.
For more details, please visit https://support.apple.com/kb/HT208050.
$ venv/bin/python -c 'import shellingham; print(shellingham.detect_shell())'
('bash', 'bash')

macOS 13.5.1 (22G90) on an ARM Mac; lmk if I can provide you with more information.

@frostming frostming self-assigned this Oct 24, 2023
@frostming frostming linked a pull request Oct 24, 2023 that will close this issue
kai687 pushed a commit to kai687/sphinxawesome-theme that referenced this issue Nov 5, 2023
Bumps [shellingham](https://github.com/sarugaku/shellingham) from 1.5.3
to 1.5.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/sarugaku/shellingham/releases">shellingham's
releases</a>.</em></p>
<blockquote>
<h2>1.5.4</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix test_get_shell test according to new code by <a
href="https://github.com/eamanu"><code>@​eamanu</code></a> in <a
href="https://redirect.github.com/sarugaku/shellingham/pull/82">sarugaku/shellingham#82</a></li>
<li>Bump certifi from 2021.5.30 to 2022.12.7 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/sarugaku/shellingham/pull/67">sarugaku/shellingham#67</a></li>
<li>fix: always detect the host shell on MacOS by <a
href="https://github.com/frostming"><code>@​frostming</code></a> in <a
href="https://redirect.github.com/sarugaku/shellingham/pull/83">sarugaku/shellingham#83</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/eamanu"><code>@​eamanu</code></a> made
their first contribution in <a
href="https://redirect.github.com/sarugaku/shellingham/pull/82">sarugaku/shellingham#82</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/sarugaku/shellingham/compare/1.5.3...1.5.4">https://github.com/sarugaku/shellingham/compare/1.5.3...1.5.4</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/sarugaku/shellingham/blob/master/CHANGELOG.rst">shellingham's
changelog</a>.</em></p>
<blockquote>
<h1>1.5.4 (2023-10-24)</h1>
<h2>Bug Fixes</h2>
<ul>
<li>Fix a bug that <code>detect_shell()</code> always returns the host
shell on MacOS.
<code>[#81](sarugaku/shellingham#81)
&lt;https://github.com/sarugaku/shellingham/issues/81&gt;</code>_</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/sarugaku/shellingham/commit/cba059e7f29f731c2fdf9c8c3ea7921182b7d6c3"><code>cba059e</code></a>
Release 1.5.4</li>
<li><a
href="https://github.com/sarugaku/shellingham/commit/bbfe7fba5da8038f79a14bb9b908e8f79b5a4219"><code>bbfe7fb</code></a>
Merge pull request <a
href="https://redirect.github.com/sarugaku/shellingham/issues/83">#83</a>
from sarugaku:frostming/issue81</li>
<li><a
href="https://github.com/sarugaku/shellingham/commit/778f76ebc2d702589119a100e57c3f713cc0dbd0"><code>778f76e</code></a>
update the tox.ini</li>
<li><a
href="https://github.com/sarugaku/shellingham/commit/17c90c6bcc51787c88b347d2cad5c385cbbcfaa3"><code>17c90c6</code></a>
update the lockfile</li>
<li><a
href="https://github.com/sarugaku/shellingham/commit/319c7f2f7dfcbb0fbaf11e23c19266947be91105"><code>319c7f2</code></a>
fix: always detect the host shell on MacOS</li>
<li><a
href="https://github.com/sarugaku/shellingham/commit/e5bdc073257cfcf4b9b51f0491078040ecfd9262"><code>e5bdc07</code></a>
Bump certifi from 2021.5.30 to 2022.12.7 (<a
href="https://redirect.github.com/sarugaku/shellingham/issues/67">#67</a>)</li>
<li><a
href="https://github.com/sarugaku/shellingham/commit/7c7a6f3d7e64914af07cf19f229eec27efc8f775"><code>7c7a6f3</code></a>
Merge pull request <a
href="https://redirect.github.com/sarugaku/shellingham/issues/82">#82</a>
from eamanu/fix-80</li>
<li><a
href="https://github.com/sarugaku/shellingham/commit/e777f20fa38a7939481230d86f54c451ce3277ae"><code>e777f20</code></a>
Fix test_get_shell test according to new code</li>
<li>See full diff in <a
href="https://github.com/sarugaku/shellingham/compare/1.5.3...1.5.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=shellingham&package-manager=pip&previous-version=1.5.3&new-version=1.5.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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 a pull request may close this issue.

2 participants