# session.Session.option_names

- **Module:** session.Session
- **Package:** libtmux
- **Language:** Rust
- **Kind:** method
- **Source:** https://github.com/libtmux/libtmux-rs/blob/f0e37052c232636b61d095817046e6bfc8f2ca40/crates/libtmux/src/session/settings.rs#L28
- **Page:** https://libtmux.org/en/rs/latest/reference/session-session-option_names/

```
session.Session.option_names(self) -> Result<Vec<String>, Error>
```

List the option names set at this session's scope.

Values are not included: tmux renders them for display with three
different quoting styles, so re-parsing them would be guesswork. Read
each value with [`Self::typed_option`], which decodes the exact bytes.

Names are `String`, not [`TmuxText`](crate::TmuxText), because tmux's
own are ASCII and every option method takes one as `&str`; a user
option (`@name`) lists cut at any whitespace in its name, and with
U+FFFD for bytes that are not UTF-8, since `show-options` prints names
unframed.

# Errors

Returns an error when tmux refuses the listing.
