Core Library0.xAPI Reference

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

method libtmux latest

Session.unset_option

Unset option for tmux target.

Source and package
Qualified name
libtmux.Session.unset_option
Module
libtmux
Declared in
Session
Package
libtmux
Source
src/libtmux/options.py
Other languages
Perlmethod Erlang PowerShell Julia Elixir Haskell Common Lisp Ruby LuaTypeScriptRustGo Java C# C++Swift Kotlin Scala OCaml F# Clojure
unset_option ( self, option: str, unset_panes: bool | None = None, global_: bool | None = None, ignore_errors: bool | None = None, scope: OptionScope | _DefaultOptionScope | None = DEFAULT_OPTION_SCOPE, ) → Self

Inherited from libtmux.options.OptionsMixin

Examples#

>>> import typing as t
>>> from libtmux.common import tmux_cmd
>>> from libtmux.constants import OptionScope
>>> class MyServer(OptionsMixin):
... socket_name = server.socket_name
... def cmd(self, cmd: str, *args: object):
... cmd_args: t.List[t.Union[str, int]] = [cmd]
... if self.socket_name:
... cmd_args.insert(0, f"-L{self.socket_name}")
... cmd_args.insert(0, "-f/dev/null")
... return tmux_cmd(*cmd_args, *args)
...
... default_option_scope = OptionScope.Server
>>> MyServer().set_option('escape-time', 1250)
<libtmux.options.MyServer object at ...>
>>> MyServer()._show_option('escape-time')
1250
>>> MyServer().unset_option('escape-time')
<libtmux.options.MyServer object at ...>
>>> isinstance(MyServer()._show_option('escape-time'), int)
True

tmux command#

The tmux commands behind unset_option.

tmux C API#

The C declarations in tmux that implement these commands.

tmux options#

Settings for the server, sessions, windows and panes, with their types, defaults and allowed values.

In other ports#

Unset a session option

Equivalents of Unset a session option in other languages
Language Equivalent
Lua libtmux.Session:unset_option
Haskell No public Haskell equivalent is implemented; the current modules expose scalar values and version parsing.
TypeScript session.Session.unsetOption
Rust session.Session.unset_option
Go tmux.Session.UnsetOption
Java reached through Session.options, whose Options carries the write
C# reached through Session.Options, whose TmuxOptions carries the write
C++ libtmux::Session::unset_option
Swift Server.unsetOption(_:scope:)
OCaml Libtmux_unix.Client.unset_option
Perl LibTmux::Server::unset_option Pass scope => 'session' and the explicit target ID where applicable; inherited and global reads are deliberate options.

No equivalent is recorded in Ruby, PowerShell, Julia, Erlang, Elixir, Common Lisp, Clojure, Kotlin, Scala or F#.

Esc

Type to search.

Reference previewOpen reference