emersion / emersion/mrsh

mrsh does not set PS1 prompt

Open
#149 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
531
Forks
40
PR merge metrics
No merged PRs in 30d

Description

Although it displays `$` (or `#` when root), it never actually sets the `PS1` prompt to this.

Relevant code: https://github.com/emersion/mrsh/blob/60ef497e4d83320be5c32505b244f0f0318e4879/shell/entry.c#L60

The other POSIX shells I tested, `bash --posix` and `dash`, both set the PS1, even if it is as simple as `$` in `dash`'s case.

Contributor guide

Open the contributing guide

Research direction

Start in shell/entry.c around line 60, where mrsh displays the default prompt, and compare the behavior with bash --posix and dash. Done means PS1 is set to the displayed "$" or "#" prompt according to the shell's privilege context.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.