Skip to content
This repository was archived by the owner on May 12, 2025. It is now read-only.

Failover to default completions #2

Closed
@truthdoug

Description

@truthdoug

Problem: When I try to write the tmux copy buffer to a file, tab completion doesn't work for the file name.

I copied text in my tmux session and tried redirect the output tmux show-buffer to append it to an existing file, like this:

$ tmux show-buffer >> /tmp/mylog.txt

I typed /tmp/m and hit tab to complete the filename but nothing happened.

The fix is to change this line:

complete -F _tmux tmux

to:

complete -o bashdefault -F _tmux tmux

The bash man page says -o bashdefault will "Perform the rest of the default bash completions if the compspec generates no matches."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions