Skip to content

Commit c50965b

Browse files
authored
Rename home-path / temp-path to home-dir / temp-dir (#2110)
* Change temp-path to temp-dir in ssh_agent.md Update for renaming in 0.110.0 * Change temp-path to temp-dir in book/special_variables.md * change temp-path to temp-dir in translated documentation * change home-path to home-dir
1 parent 7fc8e10 commit c50965b

6 files changed

Lines changed: 10 additions & 9 deletions

File tree

book/special_variables.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ next:
33
text: Programming in Nu
44
link: /book/programming_in_nu.md
55
---
6+
67
# Special Variables
78

89
Nushell makes available and uses a number of special variables and constants. Many of these are mentioned or documented in other places in this Book, but this page
@@ -20,12 +21,12 @@ The `$nu` constant is a record containing several useful values:
2021
- `history-path`: The text or SQLite file storing the command history.
2122
- `loginshell-path`: The optional config file which runs for login shells, normally `login.nu` in the config directory.
2223
- `plugin-path`: The plugin registry file, normally `plugin.msgpackz` in the config directory.
23-
- `home-path`: The user's home directory which can be accessed using the shorthand `~`.
24+
- `home-dir`: The user's home directory which can be accessed using the shorthand `~`.
2425
- `data-dir`: The data directory for Nushell, which includes the `./vendor/autoload` directories loaded at startup and other user data.
2526
- `cache-dir`: A directory for non-essential (cached) data.
2627
- `vendor-autoload-dirs`: A list of directories where third-party applications should install configuration files that will be auto-loaded during startup.
2728
- `user-autoload-dirs`: A list of directories where the user may create additional configuration files which will be auto-loaded during startup.
28-
- `temp-path`: A path for temporary files that should be writeable by the user.
29+
- `temp-dir`: A path for temporary files that should be writeable by the user.
2930
- `pid`: The PID of the currently running Nushell process.
3031
- `os-info`: Information about the host operating system.
3132
- `startup-time`: The amount of time (in duration) that it took for Nushell to start and process all configuration files.

cookbook/ssh_agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ You can work around this behavior by checking if a ssh-agent is already running
2828
```nu
2929
do --env {
3030
let ssh_agent_file = (
31-
$nu.temp-path | path join $"ssh-agent-(whoami).nuon"
31+
$nu.temp-dir | path join $"ssh-agent-(whoami).nuon"
3232
)
3333
3434
if ($ssh_agent_file | path exists) {

fr/book/thinking_in_nu.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ Cela ne fonctionne pas si `my_path` est une variable déclarée au runtime avec
5353
Cependant, si `my_path` est une [constante](/book/variables#constant-variables), cela fonctionnera, car la chaîne de caractères peut être évaluée au moment de la compilation :
5454

5555
```nu
56-
const my_path = ([$nu.home-path nushell] | path join)
56+
const my_path = ([$nu.home-dir nushell] | path join)
5757
source $"($my_path)/common.nu" # sources /home/user/nushell/common.nu
5858
```
5959

ko/book/special_variables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ next:
2020
- `history-path`: 명령 기록을 저장하는 텍스트 또는 SQLite 파일.
2121
- `loginshell-path`: 로그인 셸에 대해 실행되는 선택적 구성 파일, 일반적으로 구성 디렉터리의 `login.nu`입니다.
2222
- `plugin-path`: 플러그인 레지스트리 파일, 일반적으로 구성 디렉터리의 `plugin.msgpackz`입니다.
23-
- `home-path`: 약어 `~`를 사용하여 액세스할 수 있는 사용자의 홈 디렉터리.
23+
- `home-dir`: 약어 `~`를 사용하여 액세스할 수 있는 사용자의 홈 디렉터리.
2424
- `data-dir`: 시작 시 로드되는 `./vendor/autoload` 디렉터리 및 기타 사용자 데이터를 포함하는 누셸의 데이터 디렉터리.
2525
- `cache-dir`: 필수적이지 않은(캐시된) 데이터용 디렉터리.
2626
- `vendor-autoload-dirs`: 시작 시 자동으로 로드될 구성 파일을 타사 응용 프로그램이 설치해야 하는 디렉터리 목록입니다.
2727
- `user-autoload-dirs`: 사용자가 시작 시 자동으로 로드될 추가 구성 파일을 만들 수 있는 디렉터리 목록입니다.
28-
- `temp-path`: 사용자가 쓸 수 있어야 하는 임시 파일 경로.
28+
- `temp-dir`: 사용자가 쓸 수 있어야 하는 임시 파일 경로.
2929
- `pid`: 현재 실행 중인 누셸 프로세스의 PID.
3030
- `os-info`: 호스트 운영 체제에 대한 정보.
3131
- `startup-time`: 누셸이 시작되고 모든 구성 파일을 처리하는 데 걸린 시간(기간).

zh-CN/book/special_variables.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ Nushell 提供并使用了一系列特殊变量和常量。其中许多在本手
1414
- `history-path`: 存储命令历史的文本或 SQLite 文件
1515
- `loginshell-path`: 登录 shell 运行的可选配置文件,通常是配置目录中的 `login.nu`
1616
- `plugin-path`: 插件注册表文件,通常是配置目录中的 `plugin.msgpackz`
17-
- `home-path`: 用户的主目录,可以使用简写 `~` 访问
17+
- `home-dir`: 用户的主目录,可以使用简写 `~` 访问
1818
- `data-dir`: Nushell 的数据目录,包括启动时加载的 `./vendor/autoload` 目录和其他用户数据
1919
- `cache-dir`: 用于非必要(缓存)数据的目录
2020
- `vendor-autoload-dirs`: 第三方应用应安装配置文件的目录列表,这些文件将在启动时自动加载
2121
- `user-autoload-dirs`: 用户可以创建额外配置文件的目录列表,这些文件将在启动时自动加载
22-
- `temp-path`: 用户可写的临时文件路径
22+
- `temp-dir`: 用户可写的临时文件路径
2323
- `pid`: 当前运行的 Nushell 进程的 PID
2424
- `os-info`: 主机操作系统信息
2525
- `startup-time`: Nushell 启动并处理所有配置文件所花费的时间(持续时间)

zh-CN/cookbook/ssh_agent.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ title: ssh-agent
2828
```nu
2929
do --env {
3030
let ssh_agent_file = (
31-
$nu.temp-path | path join $"ssh-agent-($env.USER? | default $env.USERNAME).nuon"
31+
$nu.temp-dir | path join $"ssh-agent-($env.USER? | default $env.USERNAME).nuon"
3232
)
3333
3434
if ($ssh_agent_file | path exists) {

0 commit comments

Comments
 (0)