Gabriella439 / Gabriella439/turtle

how to override default shell

Open
#372 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
978
Forks
94
PR merge metrics
No merged PRs in 30d

Description

The `shell` function doesn't seem to respect the `$SHELL` env var or my current users default shell, it always runs `/bin/sh`. Fox example, running:

```haskell
#! /usr/bin/env nix-shell
#! nix-shell -i runghc -p "ghc.withPackages (x: [ x.turtle ])"

{-# LANGUAGE OverloadedStrings #-}

import Turtle

main = do
shell "echo $SHELL" empty
shell "dscl . -read ~/ UserShell" empty
shell "echo $0" empty
```

prints the following:
```
/nix/store/7b6xw0kh049s12j2sqbhdv3n6ma11c91-bash-interactive-4.4-p23/bin/bash
UserShell: /usr/local/bin/fish
/bin/sh
```

Do you know how the underlying `System.Process.shell` determines which shell to use?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with Turtle's `shell` function and inspect how it delegates to `System.Process.shell`, using the Haskell reproducer in the issue to compare `$SHELL`, the user's configured shell, and the executed shell. Done means establishing which shell is selected and identifying the supported way to override it, or documenting that limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.