waveterm/docs
Damien Storm 17fb1567e9
docs: add OSC-7 working-directory tracking documentation (#2211)
## Background & Motivation

After installing Wave Terminal, new tabs and splits always started in my
home folder instead of the current project directory, contrary to
expectations from other terminals I've used. For context, I use `bash`
for my shell.

The existing documentation did not provide guidance about the required
OSC 7 setup, so I had to dig into GitHub issues and source code to
discover that Wave relies on a terminal escape sequence to track the
shell’s working directory. This confusion represents a barrier for
first-time users.

## Description

This PR introduces a new documentation page—**Tracking Your Shell’s
Working Directory**—which:

1. Explains **why** Wave uses the OSC 7 escape sequence to keep its
internal `cmd:cwd` metadata in sync with your shell.
2. Provides copy-and-paste snippets to **enable** OSC 7 in **Bash**,
**Zsh**, and **Fish**.
3. Details **verification steps** in the Wave UI to confirm correct CWD
tracking.

By making this enhancement, users can:

- Open new tabs or split panes with their current working directory.
- Avoid the `ERRCWD invalid cwd` errors in some shell configurations.
- Spend less time troubleshooting and more time working.

## Changes

- **Added** `docs/docs/track-cwd.mdx` (new page to enable OSC 7).
- **Updated** `docs/docs/index.mdx` (linked the new page under **Other
References**).

## Related Issues

- <https://github.com/wavetermdev/waveterm/issues/1130> — New tabs
should inherit the CWD.
- <https://github.com/wavetermdev/waveterm/issues/2057> — Split panes
always start in home directory.

## Testing & Review

1. **Local build**

   ```bash
   cd waveterm
   yarn
   task docsite
   ```

- Confirm the new “Tracking Your Shell’s Working Directory” page appears
in the sidebar.
   - Verify the instructions and code samples render correctly.

2. **Content review**
   - Are the shell snippets accurate?
   - Is the enable → verify flow clear and complete?

---
_I have followed the [contributing
guidelines](https://github.com/wavetermdev/waveterm/blob/main/CONTRIBUTING.md)
and used a conventional commit message._
2025-08-14 22:47:23 -07:00
..
docs docs: add OSC-7 working-directory tracking documentation (#2211) 2025-08-14 22:47:23 -07:00
src keyboard chord support, split up/down/left/right, and clear block (#1957) 2025-02-14 13:25:25 -08:00
static Add sharp-solid font to docsite (#1813) 2025-01-23 12:23:24 -08:00
.editorconfig Move docsite to main repo (#1204) 2024-11-06 10:45:21 -08:00
.gitignore Move docsite to main repo (#1204) 2024-11-06 10:45:21 -08:00
.prettierignore Move docsite to main repo (#1204) 2024-11-06 10:45:21 -08:00
.remarkrc Move docsite to main repo (#1204) 2024-11-06 10:45:21 -08:00
babel.config.js Move docsite to main repo (#1204) 2024-11-06 10:45:21 -08:00
docusaurus.config.ts Add code highlighting to docsite (#1866) 2025-01-28 19:38:43 -08:00
eslint.config.js Move docsite to main repo (#1204) 2024-11-06 10:45:21 -08:00
package.json Bump the prod-dependencies-patch group with 3 updates (#1966) 2025-02-14 10:17:48 -08:00
prettier.config.cjs Move docsite to main repo (#1204) 2024-11-06 10:45:21 -08:00
README.md add aliases for electron:dev, electron:start, and docsite:start tasks (#1651) 2024-12-29 10:05:17 -08:00
tsconfig.json Move docsite to main repo (#1204) 2024-11-06 10:45:21 -08:00

Wave Terminal Documentation

This is the home for Wave Terminal's documentation site. This README is specifically about building and contributing to the docs site. If you are looking for the actual hosted docs, go here -- https://docs.waveterm.dev

Installation

Our docs are built using Docusaurus, a modern static website generator.

yarn

Local Development

task docsite

This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.

Build

task docsite:build:<embedded,public>

This command generates static content into the build directory and can be served using any static contents hosting service.

Deployment

Deployments are handled automatically by the Docsite and Storybook CI/CD workflow