You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/wsh-reference.mdx
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,7 @@ You can open a preview block with the contents of any file or directory by runni
23
23
24
24
```sh
25
25
wsh view [path]
26
+
wsh view -m [path] # opens in magnified block
26
27
```
27
28
28
29
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
34
35
35
36
```sh
36
37
wsh edit [path]
38
+
wsh edit -m [path] # opens in magnified block
37
39
```
38
40
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.
0 commit comments