Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Tmux 3 raises "invalid option" on an invalid option

Open
#281 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
42/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python
Domain
api, cli

Research direction

Start with tests/test_session.py and reproduce test_show_option_unknown using tmux 3.1b. Trace session.show_option and compare the exception produced for the invalid option, then determine the compatible behavior for supported tmux versions. Done means the test and exception behavior are consistent with the chosen compatibility decision.

Written by the indexing model from the issue text.

Description

Hi,

The following test:

def test_show_option_unknown(session):
    """Session.show_option raises UnknownOption for invalid option."""
    with pytest.raises(exc.UnknownOption):
        session.show_option('moooz')

in tests/test_session.py

fails because my version of tmux (3.1b) prints "invalid option: moooz" when given an invalid option.

I have no easy way to test whether tmux 2's behaviour was to throw an "unknown option" instead.

I don't know how you want to fix this. Shall we throw a UnknownOption to maintain backwards compatibility (is any one try...excepting for this specifically anyway ?) Shall we remove this test now that tmux has changed its ways ?

Dominant language
Python
Stars
1.2k
Forks
127
Avg merge
2h 13m
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tmux-python/libtmux

All issues in tmux-python/libtmux

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.