Skip to content

Bash completion does not load #701

@yvdriess

Description

@yvdriess

Describe the bug
Loading an application's custom bash completion script causes tab-completion in a vhs script to spit out inline errors: bash: _get_comp_words_by_ref: command not found.

Setup

  • Ubuntu 25.10, KDE Plasma
  • apt's bash-completion package

Cause
The cause may be related to vhs's bash invocation skipping profile or bashrc sourcing:

vhs/shell.go

Line 26 in 04e743a

Command: []string{"bash", "--noprofile", "--norc", "--login", "+o", "history"},

It may have worked before because of completion being loaded for login shells? My current system does not have a ~/.login or ~/.bash_login or similar.

Workaround

To work around this, you can add

Copy "source /usr/share/bash-completion/bash_completion"
Paste
Enter

to the .tape fixes the tab completion. (Inside a Hide/Show to omit from recording.)

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