Skip to content

Commit 0a0d8ce

Browse files
committed
feat: readme add fish install shell cmd
1 parent 2ac1053 commit 0a0d8ce

File tree

2 files changed

+97
-16
lines changed

2 files changed

+97
-16
lines changed

README-zh-Hans.md

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,70 @@
1818
安装 `docker-debug` 命令行工具
1919

2020
**mac brew**
21+
2122
```shell
22-
brew tap zeromake/docker-debug
23-
brew install docker-debug
23+
brew install zeromake/docker-debug/docker-debug
2424
```
2525

2626
**下载二进制文件**
27-
``` shell
28-
# MacOS
29-
curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/v0.7.4/docker-debug-darwin-amd64
27+
28+
<details>
29+
<summary>
30+
<kbd>使用 bash 或 zsh</kbd>
31+
</summary>
32+
33+
``` bash
34+
# get latest tag
35+
VERSION=`curl -w '%{url_effective}' -I -L -s -S https://github.com/zeromake/docker-debug/releases/latest -o /dev/null | awk -F/ '{print $NF}'`
36+
37+
# MacOS Intel
38+
curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/${VERSION}/docker-debug-darwin-amd64
39+
40+
# MacOS M1
41+
curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/${VERSION}/docker-debug-darwin-arm64
42+
43+
# Linux
44+
curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/${VERSION}/docker-debug-linux-amd64
45+
46+
chmod +x ./docker-debug
47+
sudo mv docker-debug /usr/local/bin/
48+
49+
# Windows
50+
curl -Lo docker-debug.exe https://github.com/zeromake/docker-debug/releases/download/${VERSION}/docker-debug-windows-amd64.exe
51+
```
52+
53+
</details>
54+
55+
<details>
56+
<summary>
57+
<kbd>使用 fish</kbd>
58+
</summary>
59+
60+
``` fish
61+
# get latest tag
62+
set VERSION (curl -w '%{url_effective}' -I -L -s -S https://github.com/zeromake/docker-debug/releases/latest -o /dev/null | awk -F/ '{print $NF}')
63+
64+
# MacOS Intel
65+
curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/$VERSION/docker-debug-darwin-amd64
66+
67+
# MacOS M1
68+
curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/$VERSION/docker-debug-darwin-arm64
3069
3170
# Linux
32-
curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/v0.7.4/docker-debug-linux-amd64
71+
curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/$VERSION/docker-debug-linux-amd64
3372
3473
chmod +x ./docker-debug
3574
sudo mv docker-debug /usr/local/bin/
3675
3776
# Windows
38-
curl -Lo docker-debug.exe https://github.com/zeromake/docker-debug/releases/download/v0.7.4/docker-debug-windows-amd64.exe
77+
curl -Lo docker-debug.exe https://github.com/zeromake/docker-debug/releases/download/$VERSION/docker-debug-windows-amd64.exe
3978
```
79+
</details>
80+
4081

4182
或者到 [release page](https://github.com/zeromake/docker-debug/releases/lastest) 下载最新可执行文件并添加到 PATH。
4283

43-
我们来试试!
84+
**我们来试试吧!**
4485
``` shell
4586
# docker-debug [OPTIONS] CONTAINER COMMAND [ARG...] [flags]
4687
docker-debug CONTAINER COMMAND

README.md

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,68 @@ Install the `docker-debug` cli
2020

2121
**mac brew**
2222
```shell
23-
brew tap zeromake/docker-debug
24-
brew install docker-debug
23+
brew install zeromake/docker-debug/docker-debug
2524
```
2625

2726
**download binary file**
28-
``` shell
29-
# MacOS
30-
curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/v0.7.4/docker-debug-darwin-amd64
27+
28+
<details>
29+
<summary>
30+
<kbd>use bash or zsh</kbd>
31+
</summary>
32+
33+
``` bash
34+
# get latest tag
35+
VERSION=`curl -w '%{url_effective}' -I -L -s -S https://github.com/zeromake/docker-debug/releases/latest -o /dev/null | awk -F/ '{print $NF}'`
36+
37+
# MacOS Intel
38+
curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/${VERSION}/docker-debug-darwin-amd64
39+
40+
# MacOS M1
41+
curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/${VERSION}/docker-debug-darwin-arm64
3142

3243
# Linux
33-
curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/v0.7.4/docker-debug-linux-amd64
44+
curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/${VERSION}/docker-debug-linux-amd64
3445

3546
chmod +x ./docker-debug
3647
sudo mv docker-debug /usr/local/bin/
3748

3849
# Windows
39-
curl -Lo docker-debug.exe https://github.com/zeromake/docker-debug/releases/download/v0.7.4/docker-debug-windows-amd64.exe
50+
curl -Lo docker-debug.exe https://github.com/zeromake/docker-debug/releases/download/${VERSION}/docker-debug-windows-amd64.exe
4051
```
4152

53+
</details>
54+
55+
<details>
56+
<summary>
57+
<kbd>use fish</kbd>
58+
</summary>
59+
60+
``` fish
61+
# get latest tag
62+
set VERSION (curl -w '%{url_effective}' -I -L -s -S https://github.com/zeromake/docker-debug/releases/latest -o /dev/null | awk -F/ '{print $NF}')
63+
64+
# MacOS Intel
65+
curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/$VERSION/docker-debug-darwin-amd64
66+
67+
# MacOS M1
68+
curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/$VERSION/docker-debug-darwin-arm64
69+
70+
# Linux
71+
curl -Lo docker-debug https://github.com/zeromake/docker-debug/releases/download/$VERSION/docker-debug-linux-amd64
72+
73+
chmod +x ./docker-debug
74+
sudo mv docker-debug /usr/local/bin/
75+
76+
# Windows
77+
curl -Lo docker-debug.exe https://github.com/zeromake/docker-debug/releases/download/$VERSION/docker-debug-windows-amd64.exe
78+
```
79+
</details>
80+
81+
4282
download the latest binary from the [release page](https://github.com/zeromake/docker-debug/releases/lastest) and add it to your PATH.
4383

44-
Try it out!
84+
**Try it out!**
4585
``` shell
4686
# docker-debug [OPTIONS] CONTAINER COMMAND [ARG...] [flags]
4787
docker-debug CONTAINER COMMAND

0 commit comments

Comments
 (0)