
---
url: /mod/theme/feature.md
---
# x theme feature

管理当前主题的 feature 功能

## 子命令

| 名称 | 描述 |
| ------- | ------- |
| [x theme feature use](#x-theme-feature-use) | 设置全局的主题 feature，如果不指定 terminal 环境，则更改的是默认 terminal 环境的值 |
| [x theme feature try](#x-theme-feature-try) | 设置当前 terminal 环境的主题 feature |
| [x theme feature reload](#x-theme-feature-reload) | 重新加载当前环境的 feature 配置 |
| [x theme feature cat](#x-theme-feature-cat) | 查看全局的 feature 配置文件 |
| [x theme feature get](#x-theme-feature-get) | 获取当前环境中指定 feature 的值 |


### x theme feature use

设置全局的主题 feature，如果不指定 terminal 环境，则更改的是默认 terminal 环境的值



::: tip
自定义 symbol topic 时，symbol 的格式为 (&lt;SEP&gt;&lt;root symbol&gt;&lt;SEP&gt;&lt;user symbol&gt;&lt;SEP&gt;&lt;workspace symbol&gt;&lt;SEP&gt;), SEP 可以是任意单个字符

  e.g. symbol --custom /$/$/%/
:::


- **例子**:

设置全局的主题 feature 默认启用 transient 功能

```sh
x theme feature use transient_enable always
```

设置全局的主题 feature 默认关闭 transient 功能

```sh
x theme feature use transient_enable never
```

- **使用**:

```sh
x theme feature use [FLAGS] [SUB_COMMAND]
```

- **指令**:


| 名称, 名称简写 | 描述 |
| ------- | ------- |
| `--apple` | apple 的主题 |
| `--iterm` | iterm 的主题 |
| `--vscode` | vscode 的主题 |
| `--windows` | windows terminal 的主题 |
| `--gnome` | gnome 的主题 |
| `--konsole` | konsole 的主题 |
| `--kde` | kde 的主题 |
| `--ide` | ide 的主题 |
| `--default` | 默认主题 |


- **子命令**:


| 名称 | 描述 |
| ------- | ------- |
| [x theme feature use transient_enable](#x-theme-feature-use-transient-enable) | 启动 transient 功能 |
| [x theme feature use transient_cwd](#x-theme-feature-use-transient-cwd) | 启动 transient cwd 功能，不同目录会有提示 |
| [x theme feature use transient_time](#x-theme-feature-use-transient-time) | 启动 transient time 功能，将在 transient ps1 显示时间 |
| [x theme feature use symbol](#x-theme-feature-use-symbol) | 选择 symbol 特性 |
| [x theme feature use emoji](#x-theme-feature-use-emoji) | 选择 emoji 特性 |
| [x theme feature use zshplugin](#x-theme-feature-use-zshplugin) | 加载默认的 zsh 插件 (zsh-syntax-highlighting、zsh-autosuggestions、zsh-config) |
| [x theme feature use exectime](#x-theme-feature-use-exectime) | 记录命令的执行时间，只有部分主题支持改功能 |


### x theme feature use transient_enable

启动 transient 功能


- **使用**:

```sh
x theme feature use transient_enable <#1>
```

- **参数**:


| 参数 | 描述 |
| ------- | ------- |
| `#1` | 策略<br>`always` &#124; `never` &#124; `auto` |


### x theme feature use transient_cwd

启动 transient cwd 功能，不同目录会有提示


- **使用**:

```sh
x theme feature use transient_cwd <#1>
```

- **参数**:


| 参数 | 描述 |
| ------- | ------- |
| `#1` | 策略<br>`always` &#124; `never` &#124; `auto` |


### x theme feature use transient_time

启动 transient time 功能，将在 transient ps1 显示时间


- **使用**:

```sh
x theme feature use transient_time <#1>
```

- **参数**:


| 参数 | 描述 |
| ------- | ------- |
| `#1` | 策略<br>`always` &#124; `never` &#124; `auto` |


### x theme feature use symbol

选择 symbol 特性


- **子命令**:


| 名称 | 描述 |
| ------- | ------- |
| [x theme feature use symbol --topic](#x-theme-feature-use-symbol-topic) | 选择已有的 symbol topic |
| [x theme feature use symbol --custom](#x-theme-feature-use-symbol-custom) | 自定义 symbol topic |


### x theme feature use symbol --topic

选择已有的 symbol topic


- **使用**:

```sh
x theme feature use symbol --topic|-t <#1>
```

- **参数**:


| 参数 | 描述 |
| ------- | ------- |
| `#1` | topic 名称<br>`byzantine` &#124; `sumer` &#124; `egypt` &#124; `china` &#124; `dao` ... |


### x theme feature use symbol --custom

自定义 symbol topic


- **使用**:

```sh
x theme feature use symbol --custom|-c <#1>
```

- **参数**:


| 参数 | 描述 |
| ------- | ------- |
| `#1` | symbol string |


### x theme feature use emoji

选择 emoji 特性


- **例子**:

使用 coffee emoji 用于当前主题

```sh
x theme feature try emoji ☕
```

使用 curl 获取天气 emoji 用于当前主题

```sh
x theme feature try emoji "$( curl -s "wttr.in/?format=%c" )"
```

- **使用**:

```sh
x theme feature use emoji [SUB_COMMAND] <#1>
```

- **参数**:


| 参数 | 描述 |
| ------- | ------- |
| `#1` | 自定义 emoji<br>`undefined` |


- **子命令**:


| 名称 | 描述 |
| ------- | ------- |
| [x theme feature use emoji --topic](#x-theme-feature-use-emoji-topic) | 选择已有的 emoji topic |


### x theme feature use emoji --topic

选择已有的 emoji topic


- **使用**:

```sh
x theme feature use emoji --topic|-t <#1>
```

- **参数**:


| 参数 | 描述 |
| ------- | ------- |
| `#1` | topic 名称 |


### x theme feature use zshplugin

加载默认的 zsh 插件 (zsh-syntax-highlighting、zsh-autosuggestions、zsh-config)


- **使用**:

```sh
x theme feature use zshplugin <#1>
```

- **参数**:


| 参数 | 描述 |
| ------- | ------- |
| `#1` | 策略<br>`always` &#124; `never` &#124; `auto` |


### x theme feature use exectime

记录命令的执行时间，只有部分主题支持改功能


- **使用**:

```sh
x theme feature use exectime <#1>
```

- **参数**:


| 参数 | 描述 |
| ------- | ------- |
| `#1` | 策略<br>`always` &#124; `never` &#124; `auto` |


### x theme feature try

设置当前 terminal 环境的主题 feature



::: tip
自定义 symbol topic 时，symbol 的格式为 (&lt;SEP&gt;&lt;root symbol&gt;&lt;SEP&gt;&lt;user symbol&gt;&lt;SEP&gt;&lt;workspace symbol&gt;&lt;SEP&gt;), SEP 可以是任意单个字符

  e.g. symbol --custom /$/$/%/
:::


- **例子**:

设置当前 terminal 环境的主题 feature 默认启用 transient 功能

```sh
x theme feature try transient_enable always
```

设置当前 terminal 环境的主题 feature 默认关闭 transient 功能

```sh
x theme feature try transient_enable never
```

- **子命令**:


| 名称 | 描述 |
| ------- | ------- |
| [x theme feature try transient_enable](#x-theme-feature-try-transient-enable) | 启动 transient 功能 |
| [x theme feature try transient_cwd](#x-theme-feature-try-transient-cwd) | 启动 transient cwd 功能，不同目录会有提示 |
| [x theme feature try transient_time](#x-theme-feature-try-transient-time) | 启动 transient time 功能，将在 transient ps1 显示时间 |
| [x theme feature try symbol](#x-theme-feature-try-symbol) | 选择 symbol 特性 |
| [x theme feature try emoji](#x-theme-feature-try-emoji) | 选择 emoji 特性 |
| [x theme feature try zshplugin](#x-theme-feature-try-zshplugin) | 加载默认的 zsh 插件 (zsh-syntax-highlighting、zsh-autosuggestions、zsh-config) |
| [x theme feature try exectime](#x-theme-feature-try-exectime) | 记录命令的执行时间，只有部分主题支持改功能 |


### x theme feature try transient_enable

启动 transient 功能


- **使用**:

```sh
x theme feature try transient_enable <#1>
```

- **参数**:


| 参数 | 描述 |
| ------- | ------- |
| `#1` | 策略<br>`always` &#124; `never` &#124; `auto` |


### x theme feature try transient_cwd

启动 transient cwd 功能，不同目录会有提示


- **使用**:

```sh
x theme feature try transient_cwd <#1>
```

- **参数**:


| 参数 | 描述 |
| ------- | ------- |
| `#1` | 策略<br>`always` &#124; `never` &#124; `auto` |


### x theme feature try transient_time

启动 transient time 功能，将在 transient ps1 显示时间


- **使用**:

```sh
x theme feature try transient_time <#1>
```

- **参数**:


| 参数 | 描述 |
| ------- | ------- |
| `#1` | 策略<br>`always` &#124; `never` &#124; `auto` |


### x theme feature try symbol

选择 symbol 特性


- **子命令**:


| 名称 | 描述 |
| ------- | ------- |
| [x theme feature try symbol --topic](#x-theme-feature-try-symbol-topic) | 选择已有的 symbol topic |
| [x theme feature try symbol --custom](#x-theme-feature-try-symbol-custom) | 自定义 symbol topic |


### x theme feature try symbol --topic

选择已有的 symbol topic


- **使用**:

```sh
x theme feature try symbol --topic|-t <#1>
```

- **参数**:


| 参数 | 描述 |
| ------- | ------- |
| `#1` | topic 名称<br>`byzantine` &#124; `sumer` &#124; `egypt` &#124; `china` &#124; `dao` ... |


### x theme feature try symbol --custom

自定义 symbol topic


- **使用**:

```sh
x theme feature try symbol --custom|-c <#1>
```

- **参数**:


| 参数 | 描述 |
| ------- | ------- |
| `#1` | symbol string |


### x theme feature try emoji

选择 emoji 特性


- **例子**:

使用 coffee emoji 用于当前主题

```sh
x theme feature try emoji ☕
```

使用 curl 获取天气 emoji 用于当前主题

```sh
x theme feature try emoji "$( curl -s "wttr.in/?format=%c" )"
```

- **使用**:

```sh
x theme feature try emoji [SUB_COMMAND] <#1>
```

- **参数**:


| 参数 | 描述 |
| ------- | ------- |
| `#1` | 自定义 emoji<br>`undefined` |


- **子命令**:


| 名称 | 描述 |
| ------- | ------- |
| [x theme feature try emoji --topic](#x-theme-feature-try-emoji-topic) | 选择已有的 emoji topic |


### x theme feature try emoji --topic

选择已有的 emoji topic


- **使用**:

```sh
x theme feature try emoji --topic|-t <#1>
```

- **参数**:


| 参数 | 描述 |
| ------- | ------- |
| `#1` | topic 名称 |


### x theme feature try zshplugin

加载默认的 zsh 插件 (zsh-syntax-highlighting、zsh-autosuggestions、zsh-config)


- **使用**:

```sh
x theme feature try zshplugin <#1>
```

- **参数**:


| 参数 | 描述 |
| ------- | ------- |
| `#1` | 策略<br>`always` &#124; `never` &#124; `auto` |


### x theme feature try exectime

记录命令的执行时间，只有部分主题支持改功能


- **使用**:

```sh
x theme feature try exectime <#1>
```

- **参数**:


| 参数 | 描述 |
| ------- | ------- |
| `#1` | 策略<br>`always` &#124; `never` &#124; `auto` |


### x theme feature reload

重新加载当前环境的 feature 配置


- **使用**:

```sh
x theme feature reload
```

### x theme feature cat

查看全局的 feature 配置文件


- **使用**:

```sh
x theme feature cat
```

### x theme feature get

获取当前环境中指定 feature 的值


- **使用**:

```sh
x theme feature get <#1>
```

- **参数**:


| 参数 | 描述 |
| ------- | ------- |
| `#1` | 特性<br>`transient_enable` &#124; `transient_cwd` &#124; `transient_time` &#124; `symbol` &#124; `emoji` ... |
