feat: Allow directory truncation length to be configured (#120)

This allows the directory truncation length to be configured. Previously, it was hard-coded to truncate to 3 parent directories.
This commit is contained in:
Andrew Dassonville
2019-07-28 18:05:13 -07:00
committed by Matan Kushner
parent ab46710fc4
commit 5dbf4381ac
5 changed files with 109 additions and 6 deletions
+13 -3
View File
@@ -116,9 +116,19 @@ git repo that you're currently in.
### Options
| Variable | Default | Description |
| ---------- | ------- | -------------------------------- |
| `disabled` | `false` | Disables the `directory` module. |
| Variable | Default | Description |
| ------------------- | ------- | -------------------------------------- |
| `truncation_length` | `3` | Truncates to this many parent folders. |
| `disabled` | `false` | Disables the `directory` module. |
### Example
```toml
# ~/.config/starship.toml
[directory]
truncation_length = 8
```
## Git Branch