Commit graph

32 commits

Author SHA1 Message Date
Jan De Dobbeleer 33ac83551e feat(path): enable templates for max_width
resolves #5097
2024-06-17 15:59:29 +02:00
Jan De Dobbeleer 821e45e968 feat(template): add .AbsolutePWD 2024-06-13 15:03:51 +02:00
Jan De Dobbeleer 2a144c9d07 fix(template): correctly map SHLVL for use 2024-05-14 20:16:46 +02:00
Jan De Dobbeleer ab5a9ed3a7 chore(lint): golangci-lint 1.57.0 compatibility 2024-03-23 19:21:57 +00:00
Jan De Dobbeleer 35c2588365 chore: fix function typo 2023-09-19 19:35:23 +02:00
Jan De Dobbeleer 0f8929ed13 feat(debug): print templates 2023-08-25 12:09:54 +02:00
Jan De Dobbeleer 328601be78 fix(template): save Segments correctly
resolves #4143
2023-08-08 09:25:13 +02:00
Jan De Dobbeleer ea610029b2 fix(engine): use concurrent map for Segments
resolves #4116
2023-08-03 20:12:23 +02:00
Jan De Dobbeleer f47da9592f feat(exit): implement pipestatus
BREAKING CHANGE: exit segment is now called status segment.

The exit keyword is now deprecated and will be removed in a future
release. Please use the status keyword instead:

```diff
"segments": {
    {
-     "type": "exit"
+     "type": "status"
    }
}
```

Additionally, the status segment configuration has changed to support
$PIPESTATUS. You can include a status template to customize the
rendering of each individual status code (supported in fish, zsh and
bash).

```json
"segments": {
    {
        "type": "status",
        "properties": {
            "status_template": "{{ if gt .Code 0 }}\uf071{{ else }}\uf00c{{ end }}",
            "status_separator": " "
        }
    }
}
```

In case no $PIPESTATUS is available, the status segment will fall back
to the exit code of the last command using the status template
for rendering.

The `{{ .Meaning }}` property has been marked as deprecated and can be
replaced with `{{ reason .Code }}`, allowing it to be reused in
cross segment templates.

resolves #4070
2023-07-24 11:46:33 +02:00
Jan De Dobbeleer 287f183244 feat: allow segment to override global properties 2023-04-22 12:18:09 +02:00
Jan De Dobbeleer ea29c99130 feat: add global variables 2023-02-20 14:18:38 +01:00
Jan De Dobbeleer 522a216c00 feat: add .PromptCount
relates to #3388
2023-01-23 07:46:35 +01:00
Jan De Dobbeleer 3ef7f1b481 chore(logs): pretty logs 2023-01-17 10:56:12 +01:00
maxlandon 02c557f42e refactor(go): adapt imports for go.mod consistency 2023-01-06 07:48:14 +01:00
Jan De Dobbeleer 023546fe37 chore(go): rename module 2022-12-28 20:17:59 +01:00
Jan De Dobbeleer 80b92505bc fix(template): remove the need for escaping a dot literal 2022-12-18 15:02:57 +01:00
Jan De Dobbeleer 2dc8dab25b feat(template): print actual error
relates to #3218
2022-12-18 15:02:57 +01:00
Jan De Dobbeleer 59c1c3f7ba refactor(debug): extract log from platform 2022-11-21 19:29:46 +01:00
Jan De Dobbeleer 54672cefdf feat(path): allow templates in mapped_locations
resolves #3084
2022-11-16 09:20:43 +01:00
Jan De Dobbeleer f2d926b78c fix(templates): append remaining property on return
resolves #3085
2022-11-16 09:20:43 +01:00
Jan De Dobbeleer 18f6db017a chore: rename environment to platform 2022-11-11 20:23:52 +01:00
Jan De Dobbeleer ae671c711d fix(templates): only match alphanumeric strings
relates to #2956
2022-10-19 20:58:55 +02:00
Jan De Dobbeleer dee6d18baf fix(templates): do not replace a literal dot
resolves #2956
2022-10-17 20:21:18 +02:00
Jan De Dobbeleer 9a98823166 fix(template): parse entire template
resolves #2937
2022-10-13 20:25:26 +02:00
Jan De Dobbeleer 5a57d6909d fix(template): parse temnplates correctly
resolves #2928
2022-10-13 08:40:29 +02:00
Jan De Dobbeleer b4d82c6037 fix(template): provide template as name 2022-07-12 11:16:09 +02:00
Jan De Dobbeleer 24d2ef4767 feat(templates): advanced templates logic
resolves #2491
2022-07-08 12:09:22 +02:00
Jan De Dobbeleer 0b0f119420 fix(template): allow literal dot word 2022-06-29 08:21:19 +02:00
Jan De Dobbeleer 69ae95affc feat(debug): expose Log via environment 2022-05-12 20:49:37 +02:00
Jan De Dobbeleer 482c997413 feat: reference segments properties cross segment
resolves #2208
2022-05-06 12:28:48 +02:00
Jan De Dobbeleer 9214b88475 feat(shell): add version
resolves #2108
2022-04-20 19:24:47 +02:00
Jan De Dobbeleer eef50268a9 refactor(template): rename files 2022-02-03 10:44:18 +01:00
Renamed from src/template/template.go (Browse further)