Commit Graph

3258 Commits

Author SHA1 Message Date
xenia 2134ecdc22 monkeypatch for zsh-vi-mode 2024-05-01 13:14:12 -04:00
renovate[bot] f353ab4ad1
build(deps): update crate-ci/typos action to v1.21.0 2024-04-30 20:11:37 +00:00
renovate[bot] d0f542a6d7 build(deps): update dependency vitepress to ^1.1.4 2024-04-29 06:34:19 +00:00
renovate[bot] 24fdcc6d2e
build(deps): update dependency dprint/dprint-plugin-typescript to v0.90.4 2024-04-29 01:33:57 +00:00
renovate[bot] f52af9b5aa
build(deps): update rust crate schemars to 0.8.17 2024-04-28 19:49:42 +00:00
renovate[bot] efb9ea110c
build(deps): update rust crate serde to 1.0.199 2024-04-27 05:28:55 +00:00
renovate[bot] 32baf85b64
build(deps): update rust crate unicode-width to 0.1.12 2024-04-26 23:25:23 +00:00
renovate[bot] ad4fa687e7
build(deps): update reviewdog/action-suggester action to v1.12.0 2024-04-24 10:44:43 +00:00
renovate[bot] 76dc656602
build(deps): update crate-ci/typos action to v1.20.10 2024-04-23 22:56:05 +00:00
renovate[bot] b370322852
build(deps): update embarkstudios/cargo-deny-action action to v1.6.3 2024-04-22 17:44:06 +00:00
David Knaack 94e8dad1a8
build(deps): update rust crate windows to 0.56.0 (#5928)
* build(deps): update rust crate windows to 0.56.0

* chore: update lockfile manually

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-04-22 08:44:35 +02:00
renovate[bot] 0eac8e6537 build(deps): update dependency vitepress to ^1.1.3 2024-04-22 03:43:59 +00:00
renovate[bot] 7a502e3c4a
build(deps): update dependency dprint/dprint-plugin-typescript to v0.90.3 2024-04-22 01:03:25 +00:00
renovate[bot] cce9d33509
build(deps): update rust crate toml_edit to 0.22.12 2024-04-19 16:15:26 +00:00
renovate[bot] 0bd1c75728
build(deps): update rust crate toml_edit to 0.22.11 2024-04-19 04:21:29 +00:00
renovate[bot] f543f0def0
build(deps): update rust crate serde to 1.0.198 2024-04-16 21:40:21 +00:00
renovate[bot] 98d0ac8e25
build(deps): update crate-ci/typos action to v1.20.9 2024-04-16 17:24:26 +00:00
renovate[bot] 318daa0d1d
build(deps): update rust crate serde_json to 1.0.116 2024-04-16 06:16:56 +00:00
Koichi Murase fe1a8df6fa
fix(bash): fix handling of the preserved DEBUG trap (used in Bash <= 4.3) (#5908)
* refactor(bash): use `STARSHIP_*` for the internal variable names

The current codebase uses `dbg_trap` to save the original DEBUG trap
in bash <= 4.3.  However, the variable name possibly conflicts a user
variable since it is not prefixed by `_starship` or `starship_` or
`STARSHIP_`.  In this patch, we rename `dbg_trap` to
`STARSHIP_DEBUG_TRAP` following other variables of
`STARSHIP_EXIT_STATUS` and `STARSHIP_PIPE_STATUS`.  We also rename the
variable `_PRESERVED_PROMPT_COMMAND` to `STARSHIP_PROMPT_COMMAND`.

* fix(bash): correctly extract DEBUG trap with spaces

* fix(bash): evaluate DEBUG trap by eval

The current code executes the saved DEBUG trap just by
$_starship_dbg_trap.  This causes various problems.  The content of
the variable `_starship_dbg_trap` is unexpectedly subject to the word
splitting with the pathname expansions. Also, the needed shell
expansions and quote removal are not performed.  With a custom IFS,
the content of the variable will be split in an unexpected way.  The
saved DEBUG trap needs to be executed by eval "$_starship_dbg_trap".
2024-04-16 08:16:00 +02:00
renovate[bot] 2716db6d32
build(deps): update rust crate chrono to 0.4.38 2024-04-15 13:09:55 +00:00
renovate[bot] f379b7991a build(deps): update dependency vitepress to ^1.1.0 2024-04-15 03:44:49 +00:00
renovate[bot] 52323fc51a
build(deps): update dependency dprint/dprint-plugin-typescript to v0.90.1 2024-04-15 01:45:42 +00:00
redistay 413364ece5
docs: fix typo in README.md (#5902)
docs: fix typos in README.md

Signed-off-by: redistay <wujunjing@outlook.com>
2024-04-14 21:19:30 +02:00
Koichi Murase a70a2e04bc
docs(advanced-config): fix descriptions of the ble.sh settings (#5907)
docs(advanced-config): fix the ble.sh settings
2024-04-14 17:02:54 +02:00
Michael Feist de5b7f041a
fix(xonsh): remove `| cat` workaround from xonsh init (#5113) 2024-04-14 17:02:00 +02:00
renovate[bot] 8970359f08
build(deps): update rust crate gix to 0.62.0 2024-04-13 13:05:34 +00:00
renovate[bot] bdb1ed9cd0
build(deps): update crate-ci/typos action to v1.20.8 2024-04-12 21:57:15 +00:00
renovate[bot] 61b1801fda build(deps): update crate-ci/typos action to v1.20.7 2024-04-10 05:11:44 +00:00
renovate[bot] 1f8ccb5565
build(deps): update rust crate clap_complete to 4.5.2 2024-04-09 19:33:11 +00:00
renovate[bot] 2b2b9cb2b4
build(deps): update crate-ci/typos action to v1.20.5 2024-04-09 03:56:20 +00:00
renovate[bot] f2057f9f4f
build(deps): update rust crate starship-battery to 0.8.3 2024-04-08 08:16:45 +00:00
renovate[bot] ba07823cf4 build(deps): update dependency dprint/dprint-plugin-typescript to v0.90.0 2024-04-08 03:08:41 +00:00
renovate[bot] 91c1b4f661
build(deps): update dependency vitepress to ^1.0.2 2024-04-08 01:44:28 +00:00
Thomas O'Donnell e3b5dff352
feat(k8s): Add detect env vars option (#4488)
* feat(k8s): Add detect env vars option

Have added the option to trigger the k8s module based on what env vars
are set, this has been done in a backwards compatible way so if nothing
is changed from the defaults the module will still behave the same way
as before. This is similar to what I did in #4486 for the python module
and if goes well I'd like to rollout to other modules.

* Update src/modules/kubernetes.rs

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>

* Update src/modules/kubernetes.rs

---------

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2024-04-06 15:30:19 +02:00
cgzones 3e3f18ef27
feat(container): show name if available (#5195)
Podman exports the name of the container in /run/.containerenv, which is
especially useful for distrobox environments.
2024-04-06 15:29:24 +02:00
Daniel Watkins 1a72757f01
fix: combine ANSI color codes before wrapping them (#5762)
* combine ANSI color codes before wrapping them

The existing code wraps each individual module's output for
`context.shell`, concatenates all that output together and passes it to
`AnsiStrings` to merge ANSI color codes.  However, the wrapping obscures
ANSI color codes, meaning that no merging is possible.

This commit changes the shell-specific wrapping to happen right before
output, once all modules' output has been concatenated together.  This
results in ANSI color codes being correctly merged, as well as reducing
the number of calls to `wrap_colorseq_for_shell` to one.

With a minimal `starship.toml`:

```
format = """$directory"""

[directory]
format = '[a]($style)[b]($style)'
```

The current code produces[0]:

```
\n%{\x1b[31m%}a%{\x1b[0m%}%{\x1b[31m%}b%{\x1b[0m%
```

And this commit's code:

```
\n%{\x1b[31m%}ab%{\x1b[0m%}
```

You can see that the current code emits an additional reset and repeated
color code between "a" and "b" compared to the new code.

[0] Produced in a Python shell with:

```
subprocess.check_output(
    "./target/debug/starship prompt", shell=True,
    env={"STARSHIP_CONFIG": "./starship.toml", "STARSHIP_SHELL": "zsh"}
)
```

* utils: return early from wrap_seq_for_shell unless wrapping required

* refactor(utils): simplify wrap_seq_for_shell

This commit modifies wrap_seq_for_shell to (a) return early for shells
with no wrapping required, and (b) determine the wrapping characters
once at the start of the function (rather than inline in the map
function for every character).
2024-04-06 15:28:26 +02:00
Alper Cugun 9c1eaddae1
feat(username): add aliases option (#5855)
* Create place to put it in the config

* Initial functional version

* Fix grammar

* Add option documentation to README

* Add test for two aliases and emoji translation

* Remove println

* Rewrite match as iflet

* Improve converting the reference

* Format file

* Try to restore autoformat of markdown

* Replace toml:Map with concrete IndexMap

* Update schema

* Add option that got lost
2024-04-05 23:57:13 +02:00
[Error_27] 335c514e9e
feat(odin): Add Odin Lang module (#5873)
* Add Odin lang module

* add utils string and remove commit number from output

* switch to new symbol because ZWJ support is rare

* add config docs

* add option to show the commit number

* fix lack of trimming

* fix formatting to comply with checks

* Add trailing newline to comply with cargo fmt

* Add new Odin test and add newline in cmd output
2024-04-05 23:56:49 +02:00
boreinhardt 34a8f7e628
feat(gleam): Add Gleam module (#5886)
Co-authored-by: benno.reinhardt <benno.reinhardt@silbury.com>
2024-04-05 23:56:15 +02:00
renovate[bot] f9c4bef85d
build(deps): update rust crate notify-rust to 4.11.0 2024-04-04 23:55:01 +00:00
renovate[bot] 86235967b4 build(deps): update crate-ci/typos action to v1.20.4 2024-04-04 19:33:47 +00:00
Sam ab3f529794
docs(faq): fix typo (#5905) 2024-04-04 21:33:14 +02:00
renovate[bot] a25a7d2f7f
build(deps): update rust crate strsim to 0.11.1 2024-04-03 01:58:21 +00:00
renovate[bot] 089d6d73cb
build(deps): update crate-ci/typos action to v1.20.3 2024-04-02 18:48:47 +00:00
Koichi Murase 0f859e8b61
fix(bash): use `eval` instead of a procsub for the POSIX mode (#5020)
fix(bash): use eval instead of a procsub for the POSIX mode
2024-04-02 10:45:02 +02:00
renovate[bot] 55e11a42e5
build(deps): update pest crates to 2.7.9 2024-04-02 04:55:31 +00:00
renovate[bot] c4b6fd0804
build(deps): update crate-ci/typos action to v1.20.1 2024-04-02 00:03:27 +00:00
renovate[bot] d12d9a2751
build(deps): update crate-ci/typos action to v1.20.0 2024-04-01 19:16:58 +00:00
Andrei Lapshin 5d4007f5c1
docs(preset): fix incorrect Rocky Linux key in plain text symbols preset (#5899) 2024-04-01 15:17:14 +02:00
Ramy be4e97c2d9
fix(bun): change default icon (#5880)
* feat: change bun icon #5871

* fix: reverts docs
2024-03-30 09:38:19 +01:00