Skip to content
This repository was archived by the owner on Nov 6, 2024. It is now read-only.

Commit 2fa6979

Browse files
authored
update blockids in wsh commands to use -b (#63)
1 parent 03a58ea commit 2fa6979

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

docs/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ use [Github Issues](https://github.com/wavetermdev/waveterm/issues). These docs
1515

1616
References:
1717

18+
* [Widgets](./widgets)
1819
* [Configuration](./config)
1920
* [Key Bindings](./keybindings)
20-
* [Wsh](./wsh)
21+
* [wsh command](./wsh)
2122
* [Telemetry](./telemetry)
22-
* [Widgets](./widgets)
2323
* [FAQ](./faq)
2424

2525
<!--

docs/wsh.mdx

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,24 +36,32 @@ This will open up codeedit for the specified file. This is useful for quickly e
3636
You can view the metadata of any block by running:
3737

3838
```
39-
wsh getmeta [blockid]
39+
wsh getmeta -b [blockid]
4040
```
4141

4242
This is especially useful for preview and web blocks as you can see the file or url that they are pointing to and use that in your CLI scripts.
4343

44+
blockid format:
45+
46+
* this -- the current block (this is also the default)
47+
* tab -- the id of the current tab
48+
* d6ff4966-231a-4074-b78a-20acc7226b41 -- a full blockid is a UUID
49+
* a67f55a3 -- blockids may be truncated to the first 8 characters
50+
* 5 -- if a number less than 100 is given, it is a block number. blocks are numbered sequentially in the current tab from the top-left to bottom-right. holding Ctrl:Shift will show a block number overlay.
51+
4452
---
4553

4654
## setmeta
4755

4856
You can update any metadata key value pair for blocks (and tabs) by using the setmeta command:
4957

5058
```
51-
wsh setmeta [blockid] [key]=[value]
52-
wsh setmeta [blockid] file=~/myfile.txt
53-
wsh setmeta [blockid] url=https://waveterm.dev/
59+
wsh setmeta -b [blockid] [key]=[value]
60+
wsh setmeta -b [blockid] file=~/myfile.txt
61+
wsh setmeta -b [blockid] url=https://waveterm.dev/
5462
```
5563

56-
You can get block and tab ids by right clicking on the appropriate block and selecting "Copy BlockId". When you
64+
You can get block and tab ids by right clicking on the appropriate block and selecting "Copy BlockId" (or use the block number via Ctrl:Shift). When you
5765
update the metadata for a preview or web block you'll see the changes reflected instantly in the block.
5866

5967
Other useful metadata values to override block titles, icons, colors, themes, etc.
@@ -63,7 +71,7 @@ Other useful metadata values to override block titles, icons, colors, themes, et
6371
## deleteblock
6472

6573
```
66-
wsh deleteblock [blockid]
74+
wsh deleteblock -b [blockid]
6775
```
6876

6977
This will delete the block with the specified id.

0 commit comments

Comments
 (0)