Skip to content

Commit ebda407

Browse files
committed
update asdf guide
1 parent e7911e6 commit ebda407

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

.gitmodules

Whitespace-only changes.

Makefile

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
serve:
33
hugo serve
44

5-
# 初始化下载,更新到 .gitmodules 中指定的 commit
6-
init:
7-
git submodule update --init
8-
95
lint:
106
npx @lint-md/cli **/*
117

content/learn/installing-zig.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,23 @@ Zig 官网的[下载页面](https://ziglang.org/download/)中包含常见平台
1111

1212
现在,你可以运行 `zig zen``zig version` 来测试是否安装正确。
1313

14-
> 译者注:建议读者使用版本管理工具来安装 Zig,具体可参考:[《Zig 多版本管理》]({{< ref "/post/2023-10-14-zig-version-manager.org" >}})。
14+
> 译者注:建议读者使用版本管理工具来安装 Zig。以下是使用 [asdf](https://asdf-vm.com/) 的安装方法:
1515
1616
```bash
17-
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.14.0
18-
cat <<'EOF' >> $HOME/.bashrc
19-
source "$HOME/.asdf/asdf.sh"
20-
source "$HOME/.asdf/completions/asdf.bash"
21-
EOF
17+
brew install asdf
2218

23-
asdf plugin-add zig https://github.com/zigcc/asdf-zig.git
19+
asdf plugin add zig https://github.com/zigcc/asdf-zig.git
2420

2521
# 安装最新版
2622
asdf install zig latest
23+
24+
# 设置为全局版本
25+
# asdf 0.16 之前
2726
asdf global zig latest
27+
28+
# asdf 0.16 之后
29+
asdf set --home zig latest
30+
31+
# 验证安装
2832
zig version
2933
```

0 commit comments

Comments
 (0)