Skip to content

Commit 397b544

Browse files
committed
update README
1 parent 81c1178 commit 397b544

File tree

1 file changed

+34
-16
lines changed

1 file changed

+34
-16
lines changed

README.md

Lines changed: 34 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
**Smart man page lookup for zsh vi mode**
66

7-
Press `K` on any command or option to instantly open its man page—just like in vim!
7+
Press `Shift-K` on any command or option to instantly open its man page
88

99
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)
1010
[![Zsh](https://img.shields.io/badge/Shell-Zsh-green.svg)](https://www.zsh.org/)
@@ -24,7 +24,9 @@ Press `K` on any command or option to instantly open its man page—just like in
2424
<td width="50%">
2525

2626
### 🎯 Smart Detection
27+
2728
Automatically finds the right man page for subcommands
29+
2830
```
2931
git commit → man git-commit
3032
docker run → man docker-run
@@ -34,9 +36,11 @@ docker run → man docker-run
3436
<td width="50%">
3537

3638
### 🔍 Option Jumping
39+
3740
Opens man page directly at the option definition
41+
3842
```
39-
grep -r → jumps to -r entry
43+
grep -r → jumps to -r entry
4044
ls --color → jumps to --color entry
4145
```
4246

@@ -46,20 +50,24 @@ ls --color → jumps to --color entry
4650
<td width="50%">
4751

4852
### 🔗 Combined Options
53+
4954
Works with combined short options
55+
5056
```
51-
rm -rf → finds both -r and -f
52-
tar -xvf → finds -x, -v, -f
57+
rm -rf → finds both -r and -f
58+
tar -xvf → finds -x, -v, -f
5359
```
5460

5561
</td>
5662
<td width="50%">
5763

5864
### 📝 Value Extraction
65+
5966
Handles options with values
67+
6068
```
61-
--color=always → searches --color
62-
--output=file.txt → searches --output
69+
--color=always → searches --color
70+
--output=file.txt → searches --output
6371
```
6472

6573
</td>
@@ -68,17 +76,21 @@ Handles options with values
6876
<td width="50%">
6977

7078
### 🔀 Pipe Support
79+
7180
Detects correct command in pipelines
81+
7282
```
73-
cat file | grep -i → opens man grep
74-
tree | less -N → opens man less
83+
cat file | grep -i → opens man grep
84+
tree | less -N → opens man less
7585
```
7686

7787
</td>
7888
<td width="50%">
7989

8090
### 🛠️ Multiple Formats
91+
8192
Supports various man page styles
93+
8294
```
8395
GNU: -R, -r, --recursive
8496
jq: --slurp / -s:
@@ -99,15 +111,18 @@ find: -name, -type, -exec
99111
```zsh
100112
zinit light TunaCuma/zsh-vi-man
101113
```
114+
102115
</details>
103116

104117
<details>
105118
<summary><b>antidote</b></summary>
106119

107120
Add to your `.zsh_plugins.txt`:
121+
108122
```
109123
TunaCuma/zsh-vi-man
110124
```
125+
111126
</details>
112127

113128
<details>
@@ -119,9 +134,11 @@ git clone https://github.com/TunaCuma/zsh-vi-man \
119134
```
120135

121136
Then add to your `.zshrc`:
137+
122138
```zsh
123139
plugins=(... zsh-vi-man)
124140
```
141+
125142
</details>
126143

127144
<details>
@@ -131,6 +148,7 @@ plugins=(... zsh-vi-man)
131148
git clone https://github.com/TunaCuma/zsh-vi-man ~/.zsh-vi-man
132149
echo 'source ~/.zsh-vi-man/zsh-vi-man.plugin.zsh' >> ~/.zshrc
133150
```
151+
134152
</details>
135153

136154
<br>
@@ -146,14 +164,14 @@ echo 'source ~/.zsh-vi-man/zsh-vi-man.plugin.zsh' >> ~/.zshrc
146164

147165
### Examples
148166

149-
| Command | Cursor On | Result |
150-
|:--------|:----------|:-------|
151-
| `ls -la` | `ls` | Opens `man ls` |
152-
| `ls -la` | `-la` | Opens `man ls`, jumps to `-l` |
153-
| `git commit --amend` | `commit` | Opens `man git-commit` |
154-
| `grep --color=auto` | `--color=auto` | Opens `man grep`, jumps to `--color` |
155-
| `cat file \| sort -r` | `-r` | Opens `man sort`, jumps to `-r` |
156-
| `find . -name "*.txt"` | `-name` | Opens `man find`, jumps to `-name` |
167+
| Command | Cursor On | Result |
168+
| :--------------------- | :------------- | :----------------------------------- |
169+
| `ls -la` | `ls` | Opens `man ls` |
170+
| `ls -la` | `-la` | Opens `man ls`, jumps to `-l` |
171+
| `git commit --amend` | `commit` | Opens `man git-commit` |
172+
| `grep --color=auto` | `--color=auto` | Opens `man grep`, jumps to `--color` |
173+
| `cat file \| sort -r` | `-r` | Opens `man sort`, jumps to `-r` |
174+
| `find . -name "*.txt"` | `-name` | Opens `man find`, jumps to `-name` |
157175

158176
<br>
159177

0 commit comments

Comments
 (0)