Files
tai/research/shell-multiplexer-auto-attach/fishshell-docs-4-9-status.md
T
2026-10-10 09:25:33 +02:00

3.0 KiB

status - query fish runtime information

Metadata

Field Value
Institute Molodetz Institute — Research & Retrieval Division
Subject shell-multiplexer-auto-attach
Document type Source Dossier
Tier 1
Source title status - query fish runtime information
Source URL https://fishshell.com/docs/4.9/cmds/status.html
Source publisher / author fish-shell project (fishshell.com)
Source type vendor docs
Source date (published) Unknown — not stated
Date researched 2026-10-10
Researched by tai (agent), model: Claude Sonnet 5, on behalf of retoor
Research method web search synthesis
Confidence High
Status Active

Summary

fish has no $--style variable at all; the equivalent of bash/zsh's case "$-" in *i*) interactivity check is the status is-interactive subcommand (short form status -i / --is-interactive), which succeeds (exit 0) when fish is connected to a keyboard — i.e. actually interactive, independent of how it was started. A separate status is-login (-l/--is-login) checks login-shell status. Both subcommands are documented identically across every version mirror checked, from fish 3.1 through 4.9.

Key findings

  • status is-interactive is the single, direct fish replacement for the bash/zsh case "$-" in *i*) guard used in PLEXER_BASHRC_BLOCK — same semantic question ("is this shell actually interactive"), different syntax entirely.
  • status is-login exists as a separate, distinct check — not needed by tai's plexer hook (which only cares about interactivity, not login status) but confirms fish does expose that distinction too, the same way bash's shopt login_shell does.
  • Behavior is stable and identically worded across fish 3.1, 3.3, 3.4, 3.6, 4.0, 4.1, 4.2, 4.3, 4.4, and 4.9 doc mirrors — this is a long-established, non-fragile part of fish's interface.

Pros / strengths

  • Official vendor documentation, cross-checked across ten version mirrors with word-for-word consistent behavior — as safe a primitive as isatty to build on.

Cons / limitations / caveats

  • Unlike $-, which is a variable any shell code can inspect without a subcommand call, status is-interactive is a command invocation; this is a fish idiom difference, not a limitation, but worth noting since it changes how the guard composes with other conditions (fish's if cond1; and cond2; and cond3 chaining, rather than a single &&-joined test expression).

Relevance to tai

Directly the basis for the status is-interactive guard at the top of FISH_PLEXER_BLOCK in tai.py — the single most load-bearing line in that block, since config.fish (unlike .bashrc/.zshrc) is sourced on every fish startup regardless of interactivity (see fishshell-docs-3-4-index-initialization-files.md), making this guard do work that bash/zsh get for free from their rc files only being read for interactive shells in the first place.

Changelog

Date Change
2026-10-10 Initial dossier created.