diff --git a/docs/reference/shell-integration.mdx b/docs/reference/shell-integration.mdx index ee162243..9f327dbc 100644 --- a/docs/reference/shell-integration.mdx +++ b/docs/reference/shell-integration.mdx @@ -19,8 +19,9 @@ removes itself from the equation if you run the same shell elsewhere. | **bash** | An rcfile that sources your own first. | | **fish** | A `-C` init command. | | **PowerShell** | An encoded init command that wraps your existing `prompt` function and PSReadLine's line reader. | +| **nushell** | A `--config` wrapper whose `config.nu` sources yours first, then adds tty7's hooks. Local panes only. | | **WSL** *(Windows)* | The distro's shell is bootstrapped with the same scripts. | -| **Remote panes** | The same three POSIX shells, bootstrapped over the SSH connection. Toggle per profile with **Settings → SSH → Session → Shell integration**. | +| **Remote panes** | The same three POSIX shells, bootstrapped over the SSH connection. Toggle per profile with **Settings → SSH →** a profile **→ Advanced → Session → Shell integration**. | `TTY7_SHELL_INTEGRATION` is set once it is active, and guards against a second injection when shells nest. It does not put the integration *into* a nested @@ -92,7 +93,7 @@ To get integration into that shell, make it the shell tty7 starts: - **A local pane.** Set `shell` in [config](/reference/configuration), and leave `args` out — arguments you write turn the injection off. -[If the file panel stopped following a nested shell →](/reference/troubleshooting#the-directory-stopped-following-my-shell) +[If the Files panel stopped following a nested shell →](/reference/troubleshooting#the-directory-stopped-following-my-shell) ## Per-pane history diff --git a/docs/reference/troubleshooting.mdx b/docs/reference/troubleshooting.mdx index 3b9d3a99..ee5b40bc 100644 --- a/docs/reference/troubleshooting.mdx +++ b/docs/reference/troubleshooting.mdx @@ -81,12 +81,12 @@ shell: - **Settings → Input → Prompt → History search** If they do nothing at all in a particular pane, the shell there probably has no -[shell integration](/reference/shell-integration) — nushell, elvish, xonsh and -friends run fine but do not get the prompt layer. +[shell integration](/reference/shell-integration) — elvish, xonsh and friends +run fine but do not get the prompt layer. ## The directory stopped following my shell -The file panel, new splits, and the sidebar's repo grouping all follow the +The Files panel, new splits, and the sidebar's repo grouping all follow the directory the pane's shell reports (`OSC 7`). If the pane is frozen on one directory while you `cd` around, something in the pane is not reporting it. @@ -94,7 +94,8 @@ The usual cause is a shell you started by hand. tty7 injects its [shell integration](/reference/shell-integration) into the shell it launches for the pane, and nothing else: run `zsh` at a bash prompt and that nested shell has none. Locally you rarely notice, because oh-my-zsh reports the -directory itself — but its `lib/termsupport.zsh` begins with +directory itself — but the cwd reporter sits at the end of its +`lib/termsupport.zsh`, behind ```zsh if [[ -n "$INSIDE_EMACS" || -n "$SSH_CLIENT" || -n "$SSH_TTY" ]]; then @@ -102,9 +103,10 @@ if [[ -n "$INSIDE_EMACS" || -n "$SSH_CLIENT" || -n "$SSH_TTY" ]]; then fi ``` -so over SSH, where sshd sets those, oh-my-zsh does not define the reporter at -all. A nested zsh on a remote host therefore reports nothing, from either -side, and the pane keeps showing wherever the outer shell was. +so over SSH, where sshd sets those, sourcing stops there and the reporter is +never defined — only the title hooks above that line still run. A nested zsh +on a remote host therefore reports nothing, from either side, and the pane +keeps showing wherever the outer shell was. **Make it the shell tty7 starts.** On the remote host: @@ -140,9 +142,9 @@ PROMPT_COMMAND="__tty7_cwd${PROMPT_COMMAND:+;$PROMPT_COMMAND}" Two other reasons a pane never reports its directory: -- **The shell is one tty7 does not integrate.** Locally: zsh, bash, fish, - PowerShell, nushell. Over SSH: zsh, bash, fish. A remote host whose - `$SHELL` is anything else gets no bootstrap, silently. +- **The shell is not one tty7 integrates.** It injects into zsh, bash, fish, + PowerShell and nushell locally, and into zsh, bash and fish over SSH — a + remote host whose `$SHELL` is anything else gets no bootstrap, silently. - **You gave the shell your own arguments** in `shell` or a `custom_shells` entry, which turns the injection off by design.