Skip to content

Commit 9343de1

Browse files
committed
update command line usage
1 parent 089eed2 commit 9343de1

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

data/doc/2.cmd.md

+26
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,29 @@ way-edges togglepin <group_name>:<widget_name>
6262
```
6363

6464
Most of the widgets support `pin`, use `group name` + `:` + `widget name` to toggle a widget's pin state.
65+
66+
## Shell completions
67+
68+
### Bash
69+
70+
If you install way-edges via [way-edges-bin](https://aur.archlinux.org/packages/way-edges-bin/), then you'll get completion script installed to `/usr/share/bash-completion/completions/way-edges`.
71+
72+
Else then you'll have to copy the `https://github.com/way-edges/way-edges/blob/master/way-edges-bash-complete.bash` file to that place(you can rename it to `way-edges`).
73+
74+
### Other shell
75+
76+
For other shell, you'll have to generate it on your own:
77+
78+
```shell
79+
$ COMPLETE=zsh way-edges
80+
```
81+
82+
But there might be some issues generating completions after colon, you can either find a way and modify the script on your own, or submit an issue on GitHub.
83+
84+
### _AS A REMINDER_:
85+
86+
current clap version: 4.5.20
87+
current clap-complete version: 4.5.36
88+
89+
The doc for dynamic completion is not robust(it's still in `unstable-xx` feature), it doesn't show the right way of generating dynamic completion script.
90+
And also, to avoid the misbehave of completion with colon(`:`), i have to modify the completion script my own.

0 commit comments

Comments
 (0)