Commit 17fb156
authored
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
- <#1130> — New tabs
should inherit the CWD.
- <#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._1 parent 1cdd746 commit 17fb156
1 file changed
Lines changed: 83 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
38 | 120 | | |
39 | 121 | | |
40 | 122 | | |
41 | 123 | | |
42 | 124 | | |
43 | 125 | | |
44 | | - | |
| 126 | + | |
45 | 127 | | |
46 | 128 | | |
47 | 129 | | |
| |||
0 commit comments