# libtmux._internal.log_context._scan_global_options

- **Module:** libtmux._internal.log_context
- **Package:** libtmux
- **Language:** Python
- **Kind:** function
- **Source:** https://github.com/tmux-python/libtmux/blob/efdbb5637666b166358772ecc737b3807beab21e/src/libtmux/_internal/log_context.py#L250
- **Page:** https://libtmux.org/en/py/latest/reference/libtmux-_internal-log_context-_scan_global_options/

```
libtmux._internal.log_context._scan_global_options(
    tokens: Sequence[str], stop_on_unknown: bool
) -> tuple[int | None, str | None]
```

Scan tmux client flags and return ``(first_cmd_index, socket)``.

## Parameters

- `tokens` (`Sequence[str]`)
- `stop_on_unknown` (`bool`)
