Skip to content

Add SHELL_PROMPT_PREFIX et al to default prompts #10924

@septatrix

Description

@septatrix

The most recent systemd version has introduced a set of new standard environment variables that shall be consumed by shells for their prompt. These are SHELL_PROMPT_PREFIX, SHELL_PROMPT_SUFFIX, and SHELL_WELCOME.

They are passed to the invoked session processes, where they are imported into any shell prompt (specifically $SHELL_PROMPT_PREFIX is added as prefix to $PS1, and $SHELL_PROMPT_SUFFIX as suffix) or printed on screen when a shell first initializes.

They are for example also set when using run0 (an suid-less alternative to sudo/doas) and there have been ideas to also set them when entering containers, VMs, remote hosts etc.

Systemd itself provides a profile.d file for this purpose but these are not used by fish. It would therefore be great if fish picked them up in its default prompts.

More details in the initial PR: systemd/systemd#34297

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions