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:
|
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.)
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
Cause
The cause may be related to vhs's bash invocation skipping profile or bashrc sourcing:
vhs/shell.go
Line 26 in 04e743a
It may have worked before because of completion being loaded for login shells? My current system does not have a
~/.loginor~/.bash_loginor similar.Workaround
To work around this, you can add
to the .tape fixes the tab completion. (Inside a Hide/Show to omit from recording.)