Skip to content

bash PROMPT_COMMAND causes errors #691

@felixge

Description

@felixge

Describe the bug

The presence of a PROMPT_COMMAND environment variable is prone to causing errors when feeding a tape into VHS.

This is common when using tool like mise, zoxide and/or custom prompt commands. For example my PROMPT_COMMAND includes _mise_hook;__zoxide_hook;generate_prompt; - all of these commands are bash functions, so they are not accessible from a VHS session that didn't source my bashrc.

Setup

  • GNU bash, version 5.3.3
  • macOS 15.6

To Reproduce

On my machine:

go run . ./examples/commands/enter.tape 

Image

This reproducer should work on any machine:

PROMPT_COMMAND=does-not-exist go run . ./examples/commands/enter.tape 

Image

Expected behavior

PROMPT_COMMAND= go run . ./examples/commands/enter.tape 

Image

Additional context

Proposed fix: #692

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions