fix: Truncate long paths in conda environment names (#694)

Environment names created via conda create -p [path] tend to be too long for comfort, so this truncates them.
This commit is contained in:
AppleTheGolden
2019-12-09 18:59:02 +01:00
committed by Matan Kushner
parent 60a1319524
commit 3c835ba34b
7 changed files with 100 additions and 72 deletions
+12 -6
View File
@@ -289,15 +289,21 @@ prefix = "underwent "
## Conda
The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set.
Note: This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`
::: tip
This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`.
:::
### Options
| Variable | Default | Description |
| ---------- | -------------- | -------------------------------------------- |
| `symbol` | `"C "` | The symbol used before the environment name. |
| `style` | `"bold green"` | The style for the module. |
| `disabled` | `false` | Disables the `conda` module. |
| Variable | Default | Description |
| ------------------- | -------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. |
| `symbol` | `"C "` | The symbol used before the environment name. |
| `style` | `"bold green"` | The style for the module. |
| `disabled` | `false` | Disables the `conda` module. |
### Example