Skip to content

Commit 8df9913

Browse files
committed
break out wsh editor and clarify behavior. also document -m flag...
1 parent f59fdb5 commit 8df9913

1 file changed

Lines changed: 22 additions & 1 deletion

File tree

docs/docs/wsh-reference.mdx

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ You can open a preview block with the contents of any file or directory by runni
2323

2424
```sh
2525
wsh view [path]
26+
wsh view -m [path] # opens in magnified block
2627
```
2728

2829
You can use this command to easily preview images, markdown files, and directories. For code/text files this will open
@@ -34,9 +35,29 @@ a codeedit block which you can use to quickly edit the file using Wave's embedde
3435

3536
```sh
3637
wsh edit [path]
38+
wsh edit -m [path] # opens in magnified block
3739
```
3840

39-
This will open up codeedit for the specified file. This is useful for quickly editing files on a local or remote machine in our graphical editor. This command will wait until the file is closed before exiting (unlike `view`) so you can set your `$EDITOR` to `wsh editor` for a seamless experience. You can combine this with a `-m` flag to open the editor in magnified mode.
41+
This will open up a codeedit block for the specified file. This is useful for quickly editing files on a local or remote machine in Wave's graphical editor. This command returns immediately after opening the block.
42+
43+
For `$EDITOR` integration (e.g. with `git commit`), see [`wsh editor`](#editor) which blocks until the file is closed.
44+
45+
---
46+
47+
## editor
48+
49+
```sh
50+
wsh editor [path]
51+
wsh editor -m [path] # opens in magnified block
52+
```
53+
54+
This opens a codeedit block for the specified file and **blocks until the editor is closed**. This is useful for setting your `$EDITOR` environment variable so that CLI tools (e.g. `git commit`, `crontab -e`) open files in Wave's graphical editor:
55+
56+
```sh
57+
export EDITOR="wsh editor"
58+
```
59+
60+
The file must already exist. Use `-m` to open the editor in magnified mode.
4061

4162
---
4263

0 commit comments

Comments
 (0)