1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-11-11 07:40:57 +00:00
Commit Graph

367 Commits

Author SHA1 Message Date
Lyndon Sanche
e680540cfc
feat(cmd_duration): Make notification timeout configurable (#3515)
* Allow customization of notification timeout

* Document new notification duration option

* Check for out-of-bounds timeout and correct it

* Implement ModuleConfig for u32

* Revert "Check for out-of-bounds timeout and correct it"

This reverts commit 52109ab5f7c336b55c81bccafb3adbfc81514553.

* Switch notification_timeout to u32

* Note notification_daemons might not honor timout

* Notification timeout defaults to daemon timeout

* Leave default value of notification_timeout blank in docs
2022-01-29 22:56:55 +01:00
kanchi
7c1fe67c19
docs: remove meaningless invisible character (#3519) 2022-01-27 17:33:46 +01:00
Aaron Friel
568d057032
feat: add username to Pulumi module (#3428)
* feat: add username to Pulumi module

* run dprint fmt
2022-01-25 10:40:44 -06:00
Thomas O'Donnell
31ab8aa0c5
ci: Fix failing CI jobs (#3481)
Have updated the workflow to only run the "Block Translated Changes" job
on PRs since it will fail when run on pushes to a branch. Have fixed the
formatting while I was here.
2022-01-21 11:19:56 -06:00
Harald Hoyer
4f46411403
feat: add a container indicator (#3304)
* test: add mock method for absolute files

Signed-off-by: Harald Hoyer <harald@hoyer.xyz>

* feat(module): add a container indicator module

Adds a container type indicator, if inside a container,
detected via the presence of some marker files.

E.g. inside a podman container entered with `toolbox enter`
the prompt changes to the container name and version.

```
starship on  container_rebased [$!] is 📦 v1.0.0 via 🦀 v1.56.1
❯ toolbox enter

starship on  container_rebased [$!] is 📦 v1.0.0 via 🦀 v1.56.1
⬢ [fedora-toolbox:35] ❯
```

Signed-off-by: Harald Hoyer <harald@hoyer.xyz>
2022-01-21 09:44:46 -06:00
Kevin Song
0965667807
ci: Use dprint to format documentation + TOML files (#3426)
Adds Rust-based standardized markdown formatting and a CI step to catch unformatted files.
2022-01-20 11:32:09 +03:00
Jyotirmoy Bandyopadhyaya [Bravo68]
360c7942f6
docs: Fixed starship config location (#3432)
* Fixed starship config location

config file during creation and when used as export variable into shells are different.
Fixed to make it uniform and avoid errors

* Update README.md

* Update docs/config/README.md

Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>

* Update docs/config/README.md

Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>

* Update docs/config/README.md

Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>

Co-authored-by: Thomas O'Donnell <andytom@users.noreply.github.com>
2022-01-15 13:35:55 +03:00
moko256
106afba671
docs(cmd_duration): rust-notify -> notify-rust (#3417) 2022-01-13 08:03:30 +01:00
Rashil Gandhi
c335b4267b
feat: add support for cmd (#3277)
* feat: add support for cmd

* add preprompt and precmd support

* add keymap support

* add info about minimum Clink version

* simplify escaping

* add handling for cmd custom commands

* add support for transient_prompt and transient_rprompt

* Revert 914057952508e81e20086fcb707ba2a0be85fdd3

This reverts commit "add support for transient_prompt and transient_rprompt"

* Apply suggestions from code review

* disable cmd shell custom commands

* any shell other than cmd can be used

* better error and correct script location

* move shell check in `map_no_escaping`
2022-01-09 23:47:53 -06:00
moko256
500dc3ea6e
feat(elvish): last command status (#3403) 2022-01-06 22:00:38 +01:00
Zhong Liu
295948bc6c
feat(package): support for dart pub version (#3373)
* feat(package): add support for dart pub version

* feat(package): add doc for dat pub version
2022-01-01 23:57:20 +01:00
Kevin Song
23764675c0
docs: Add nu_indicator to doc tables (#3365) 2021-12-31 08:20:53 +01:00
arcnmx
a95332485b
perf(git_status): tweak exec flags to omit unnecessary info (#3287)
* perf(git_status): tweak flags to omit extra info

`git status` can be prohibitively slow on some repos, so allow the
config to influence what flags are passed to git. For instance, if there
is no configured symbol for untracked files, tell git to omit them from
its output. This can easily result in a 2~10x speedup in many cases, but
requires the user to opt-in to hiding information from the prompt.

* docs(git_status): add ignore_submodules option
2021-12-30 15:12:53 -06:00
Segev Finer
1c305c9de7
feat(directory): Windows path formatting via path_slash::PathBufExt (#3157)
* feat: Experimental Windows path formatting via path_slash::PathBufExt

* Rework the slash path conversion into a real PR

* Add a test for convert_slash = false

* Attempt fixing CI failures

* Fix lint and fmt

* Fix docs/config/README.md getting messed up

* Rename convert_slash/from_slash

* Move convert_path_sep calls in tests

* Keep path_vec immutable

* Run rustfmt
2021-12-30 09:57:13 +01:00
Maximous Black
f48c7a26cf
feat(deno): detect deno.json and deno.jsonc (#3220)
* feat(deno): detect `deno.json` and `deno.jsonc`

* update docs

* update tests

* cargo fmt

* revert lockfile changes

* revert doc updates to non-english files

* Restore README.md

* fmt
2021-12-30 09:55:46 +01:00
Kevin Song
52abffaec6
docs: Fix incorrect variables for hostname module (#3361) 2021-12-30 09:49:21 +01:00
Mika Fischer
cb40787e2a
feat(status): Add hex_status (#3312) 2021-12-21 05:05:28 -05:00
Kid
faa9050f51
docs(config): clarify special characters escaping (#3313) 2021-12-12 14:51:13 -06:00
Mikkel Mork Hegnhoj
365b295433
feat(azure): Azure module (#3275)
* Azure module

* make Semantic PR bot happy

* Responding to review

* Changing severity of logging event
2021-12-06 23:01:33 +01:00
pejax
1109fd6997
feat: Add package version detection for sbt projects (#3274) 2021-12-03 01:56:06 -05:00
Gabriel Victor
779e53cd66
feat(module): Add sudo module (#3135)
* add feature - sudo module

* add sudo module identifiers and entry point

* fix test test_sudo_not_cached

* add test test_sudo_cached

* add `allow_windows` and `binary` options

* rustfmt sudo_x_cached and rmv them on windows

* add false `allow_windows` block windows test

* add `doas` cached/not_cached tests

* better description in `starship explain`

* fix `test_doas_cached` with `-n` flag

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

* rmv `binary` alternatives and their tests

* fix symbol and update config/README

* fix all mocks to use `sudo -n true`

* fix expected output in `test_sudo_cached`

* proper checking for blocked sudo

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

* add `allow_windows = true` to non-windows tests

* allow sudo_* tests to run on windows + fix parsed

* rustfmt `blocks_windows` test

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2021-11-15 06:46:13 +01:00
t-mangoe
b07abc990e
feat: style git repo root (#2010) 2021-11-09 14:12:40 -05:00
Aaron Kollasch
d1ce352528
feat(ruby): Add environment variable checks to ruby module (#3206)
* feat(ruby): Add environment variable checks to ruby module

* docs(ruby): describe version detection method
2021-11-08 21:21:09 +01:00
Pandademic
0c93c8441e
docs(battery): add quotes in example 2021-11-03 08:07:35 -04:00
Fred Cox
c1f2d345aa
fix(escaping): move escaping to individual variables (#3107) 2021-11-01 22:18:45 +01:00
Thomas O'Donnell
39e7b78cb2
feat: also read from DOCKER_MACHINE_NAME (#3175)
This adds support to also read the context from `DOCKER_MACHINE_NAME`
since it is a bit more user friendly.
2021-10-25 07:54:39 +02:00
Aman Kumar Sinha
eb203ebe95
feat(fill): add disabled option for fill module (#3158)
* add disabled option for fill module

* update tests

* update docs
2021-10-21 14:27:32 +02:00
vypxl
614e0e2763
feat(package): Add support for crystal shards (#3147)
* add crystal shard (package) version support

* module package: crystal shard version: read shard.yml directly

* module package: add test for crystal shard version

* format src/modules/package.rs

* use yaml-rust instead of serde-yaml

* document shards package support

* Update docs/config/README.md

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

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
2021-10-13 07:42:55 +02:00
Aman Kumar Sinha
9f2f5293e3
docs: fix custom commands example (#3129) 2021-10-06 18:31:26 -05:00
Ian Wahbe
dfb1208787
feat: Add pulumi module (#3055) 2021-10-05 18:27:25 -05:00
Aman Kumar Sinha
f8e81a1622
feat(shell): Add style config for shell module (#3108)
* add style config for shell module

* update shell docs

* fix formatting

* update tests
2021-10-04 19:46:33 +02:00
Thomas O'Donnell
e74f428615
fix(terraform): Improve module triggers (#3113)
Have updated which extentions trigger the terraform module, to remove
the `hcl` since this gives false positives as it is used by other
Hashicorp products and add the `tfstate` and `tfplan` which are more
accurate indicators.
2021-10-04 18:08:58 +02:00
Onigiri
e85a68578c
docs(config): Add missing double quotes to default value strings (#2981) 2021-10-02 16:03:18 -04:00
Kevin Song
35f6206593
docs: Add missing modules to $all in config docs (#3075)
* Add cobol to $all in config docs

* Undo whitespace changes

* Add singluarity/rlang, move lua to correct location
2021-09-17 16:16:36 -05:00
Dave Powers
913dc3af2a
docs: fix grammar in config README (#3069) 2021-09-17 11:46:42 -04:00
Matthew (Matt) Jeffryes
5d0a38aca3
feat: Add a fill module to pad out the line (#3029) 2021-09-12 19:59:15 -04:00
Matthew (Matt) Jeffryes
79585dcb17
feat: Add support for RPROMPT (right prompt) (#3026)
Adds support for zsh, fish, and elvish.

Co-authored-by: Matan Kushner <hello@matchai.dev>
2021-09-08 15:45:27 -04:00
Bill
08b5cd0862
feat(cobol): added COBOL module (#2994)
* feat: added COBOL module

* slight README fix

* added command faking for COBOL

* updated COBOL symbol to better suit language

Co-authored-by: Bill Risher <bill@encephaloinvestments.com>
2021-09-07 09:59:14 -05:00
Kid
494b6eb40f
docs(config): change spelling of some words (#2855)
* docs(config): correct spelling

* Add more reference links

* Fix blank line

* Fix bad merge
2021-09-01 20:34:41 +02:00
machupicchubeta
f265f12eb2
docs: Correct the "VLang" configuration example (#3019)
* Correct the "VLang" configuration example

This commit is a document correction only; to avoid the configuration error.
The documents to be corrected are "docs/[lang]/README.md".

With a config key of `[v]` on macOS, it has the following error.
```
[WARN] - (starship::configs::starship_root): Unknown config key 'v'
```
I think it might be the error in other OS as well.

In the other document "docs/[lang]/presets/README.md", the config key is `[vlang]`.

* Touch only the English docs

The changes to the translated pages will be done automatically.
2021-08-29 17:26:41 +02:00
filip
6b13296741
feat(git_metrics): Git metrics show only nonzero diffs (#2887)
* implement only_nonzero_diffs configuration option

* update documetation
2021-08-27 09:38:46 -05:00
Thomas O'Donnell
9e5fcd1e14
feat(red,vlang): Add version formatting (#2987)
Have added version formatting to the red and vlang modules. Note the
docs for red already mentioned the `version_format` string but it had
not actually been added.
2021-08-15 21:30:58 +02:00
Alexander González
7038ae2ec8
fix(jobs): Add the symbol and number thresholds respecting the threshold option (#2908)
* feat: Add the symbol and number thresholds respecting the threshold option

* fix: Maintain the old behavior + add lots of tests

* docs: Fix the jobs module documentation
2021-08-14 15:29:25 +02:00
Bill
b2e2330cb0
feat(git_status): added symbol for local repos up-to-date with remote. (#2945)
* git_status: added symbol for when local branch is up-to-date with upstream

* updated docs

* removed unused variable, moved location of config comment

* changed uptodate default to empty string, simplified and made safer

* added uptodate default line back into docstring

* fixed linting and formatting errors

* refactored uptodate to up_to_date, removed redundant else statement
2021-08-07 19:22:00 +02:00
Thomas O'Donnell
b7b7df9885
feat(package): Add ability to format the version (#2959)
Have added the ability to use format the version of the package using
the `version_format` option. While doing this I have also done some
refactoring of the module to remove the if/else if/... block and replace
it with an iterator. This should make fix some edge cases where versions
are not correctly picked up due to other files an example would be a
python project that has a `pyproject.toml` file but using the
`setup.cfg` for the package version. It should also make it easier to
make the order of the list configurable in the future.
2021-08-06 21:16:14 +02:00
David Herberth
cd6fc9cea0
feat(kubernetes): implements regex matching for context aliases (#2883) 2021-08-03 23:56:28 +02:00
Hugues Morisset
40cb667b9d
feat(status): Add pipestatus display in status module (#2481)
* feat: Add pipestatus display in status module

This MR is based on this one https://github.com/starship/starship/pull/370

* Documentation

* Add a test with map_symbol false

* Handle bash preexec pipestatus

* Add zsh support

* Add fish support

Thanks kidonng for the diff patch

* Rename sucess_symbol to success_symbol
2021-07-28 12:26:00 -04:00
Tom
2fa7f56cec
feat(package): Support package version from setup.cfg (python). (#2890)
* Support package version from setup.cfg (python).

Add an additional package version extraction function to parse
the 'version' attribute under the 'metadata' section in a python
package 'setup.cfg' file.

Also add similar tests from the poetry extraction function to test
the desired behaviour.

This adds a dependency on ConfigParser:
https://crates.io/crates/configparser.

* Clean up comments

* Use rust_ini over ConfigParser

* Add mention to setup.cfg version parsing in docs
2021-07-27 17:58:35 +02:00
MeztliRA
ed60b69bcc
docs: fix shlvl module's symbol (#2911) 2021-07-26 11:02:47 -04:00
Shakil Bijabhai
80c5eca2ee
docs: fix typo for python in README.md (#2909) 2021-07-22 15:20:55 -04:00