-
-
Notifications
You must be signed in to change notification settings - Fork 137
fix variable links in os docs #240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -342,7 +342,7 @@ local outdata, errdata = os.iorunv("echo", {"hello", "xmake!"}, {envs = {PATH=". | |||||
|
|
||||||
| - Get temporary directory | ||||||
|
|
||||||
| Consistent with the result of [$(tmpdir)](#var-tmpdir), it is just a direct return to return a variable that can be maintained with subsequent strings. | ||||||
| Consistent with the result of [$(tmpdir)](/api/description/builtin-variables#var-tmpdir), it is just a direct return to return a variable that can be maintained with subsequent strings. | ||||||
|
|
||||||
| ```lua | ||||||
| print(path.join(os.tmpdir(), "file.txt")) | ||||||
|
|
@@ -364,7 +364,7 @@ Used to get a temporary file path, just a path, the file needs to be created by | |||||
|
|
||||||
| - Get the current directory path | ||||||
|
|
||||||
| Consistent with the result of [$(curdir)](#var-curdir), it is just a direct return to return a variable that can be maintained with subsequent strings. | ||||||
| Consistent with the result of [$(curdir)](/api/description/builtin-variables#var-curdir), it is just a direct return to return a variable that can be maintained with subsequent strings. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This sentence has the same awkward phrasing as in line 345. For better readability, consider rephrasing it.
Suggested change
|
||||||
|
|
||||||
| Usage reference: [os.tmpdir](#os-tmpdir). | ||||||
|
|
||||||
|
|
@@ -380,15 +380,15 @@ print(os.filesize("/tmp/a")) | |||||
|
|
||||||
| - Get the path of the current description script | ||||||
|
|
||||||
| Consistent with the result of [$(scriptdir)](#var-scriptdir), it is just a direct return to return a variable that can be maintained with subsequent strings. | ||||||
| Consistent with the result of [$(scriptdir)](/api/description/builtin-variables#var-scriptdir), it is just a direct return to return a variable that can be maintained with subsequent strings. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This sentence has the same awkward phrasing as in previous lines. For better readability, consider rephrasing it.
Suggested change
|
||||||
|
|
||||||
| Usage reference: [os.tmpdir](#os-tmpdir). | ||||||
|
|
||||||
| ## os.programdir | ||||||
|
|
||||||
| - Get the xmake installation main program script directory | ||||||
|
|
||||||
| Consistent with the result of [$(programdir)](#var-programdir), it is just a direct get returned to a variable, which can be maintained with subsequent strings. | ||||||
| Consistent with the result of [$(programdir)](/api/description/builtin-variables#var-programdir), it is just a direct get returned to a variable, which can be maintained with subsequent strings. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The phrasing 'it is just a direct get returned to a variable, which can be maintained with subsequent strings' is grammatically incorrect and unclear. It should be rephrased for clarity.
Suggested change
|
||||||
|
|
||||||
| ## os.programfile | ||||||
|
|
||||||
|
|
@@ -398,7 +398,7 @@ Consistent with the result of [$(programdir)](#var-programdir), it is just a dir | |||||
|
|
||||||
| - Get the project home directory | ||||||
|
|
||||||
| Consistent with the result of [$(projectdir)](#var-projectdir), it is just a direct return to return a variable that can be maintained with subsequent strings. | ||||||
| Consistent with the result of [$(projectdir)](/api/description/builtin-variables#var-projectdir), it is just a direct return to return a variable that can be maintained with subsequent strings. | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This sentence has the same awkward phrasing as in previous lines. For better readability, consider rephrasing it.
Suggested change
|
||||||
|
|
||||||
| ## os.arch | ||||||
|
|
||||||
|
|
@@ -410,7 +410,7 @@ That is the default architecture of the current host system, for example, I exec | |||||
|
|
||||||
| - Get the operating system of the current host | ||||||
|
|
||||||
| Consistent with the result of [$(host)](#var-host), for example, if I execute xmake on `linux x86_64` to build, the return value is: `linux` | ||||||
| Consistent with the result of [$(host)](/api/description/builtin-variables#var-host), for example, if I execute xmake on `linux x86_64` to build, the return value is: `linux` | ||||||
|
|
||||||
| ## os.subhost | ||||||
|
|
||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -352,7 +352,7 @@ os.setenv("HOME", "/tmp/") | |||||
|
|
||||||
| - 获取临时目录 | ||||||
|
|
||||||
| 跟[$(tmpdir)](#var-tmpdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 | ||||||
| 跟[$(tmpdir)](/zh/api/description/builtin-variables#var-tmpdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The phrase
Suggested change
|
||||||
|
|
||||||
| ```lua | ||||||
| print(path.join(os.tmpdir(), "file.txt")) | ||||||
|
|
@@ -374,7 +374,7 @@ print("$(tmpdir)/file.txt") | |||||
|
|
||||||
| - 获取当前目录路径 | ||||||
|
|
||||||
| 跟[$(curdir)](#var-curdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 | ||||||
| 跟[$(curdir)](/zh/api/description/builtin-variables#var-curdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to the comment on line 355, the phrase
Suggested change
|
||||||
|
|
||||||
| 用法参考:[os.tmpdir](#os-tmpdir)。 | ||||||
|
|
||||||
|
|
@@ -390,15 +390,15 @@ print(os.filesize("/tmp/a")) | |||||
|
|
||||||
| - 获取当前描述脚本的路径 | ||||||
|
|
||||||
| 跟[$(scriptdir)](#var-scriptdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 | ||||||
| 跟[$(scriptdir)](/zh/api/description/builtin-variables#var-scriptdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to previous comments, the phrase
Suggested change
|
||||||
|
|
||||||
| 用法参考:[os.tmpdir](#os-tmpdir)。 | ||||||
|
|
||||||
| ## os.programdir | ||||||
|
|
||||||
| - 获取xmake安装主程序脚本目录 | ||||||
|
|
||||||
| 跟[$(programdir)](#var-programdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 | ||||||
| 跟[$(programdir)](/zh/api/description/builtin-variables#var-programdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to previous comments, the phrase
Suggested change
|
||||||
|
|
||||||
| ## os.programfile | ||||||
|
|
||||||
|
|
@@ -408,7 +408,7 @@ print(os.filesize("/tmp/a")) | |||||
|
|
||||||
| - 获取工程主目录 | ||||||
|
|
||||||
| 跟[$(projectdir)](#var-projectdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 | ||||||
| 跟[$(projectdir)](/zh/api/description/builtin-variables#var-projectdir)结果一致,只不过是直接获取返回一个变量,可以用后续字符串维护。 | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similar to previous comments, the phrase
Suggested change
|
||||||
|
|
||||||
| ## os.arch | ||||||
|
|
||||||
|
|
@@ -420,7 +420,7 @@ print(os.filesize("/tmp/a")) | |||||
|
|
||||||
| - 获取当前主机的操作系统 | ||||||
|
|
||||||
| 跟[$(host)](#var-host)结果一致,例如我在`linux x86_64`上执行xmake进行构建,那么返回值是:`linux` | ||||||
| 跟[$(host)](/zh/api/description/builtin-variables#var-host)结果一致,例如我在`linux x86_64`上执行xmake进行构建,那么返回值是:`linux` | ||||||
|
|
||||||
| ## os.subhost | ||||||
|
|
||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The phrasing 'it is just a direct return to return a variable that can be maintained with subsequent strings' is a bit awkward and could be improved for clarity. Consider rephrasing to make it easier to understand.