1
0
mirror of https://github.com/Llewellynvdm/starship.git synced 2024-12-13 06:27:46 +00:00
starship/src/modules
David Cantrell dd73447329
feat: Add the ability to have some file extensions *prevent* a module from triggering (#4043)
* test that we can match a multi-part file extension such as in foo.tar.gz

* now we can match multi-part file extensions like on foo.tar.gz

* add a test that a !ext is a negative match and over-rides any positive match

* test that negative extensions that don't match any file have no effect

* fail the match if any negative extensions exist

* cargo fmt

I'm not happy with this, in particular it's made the structures of has_any_positive_extension and has_no_negative_extension look different, and the logic in is_match is harder to follow

* placate clippy

* documentation for multi-part extensions and negative extensions

* get rid of an unnecessary .to_string() and comment the necessary but weird-looking invocations of .to_string_lossy().to_string()

* tests for negative matching of files and folders

* fail the match is any negative files/folders match

* document file/folder negative matching; be less prolix

* suppress Nodejs if Deno files are present (#2627)

* Revert "suppress Nodejs if Deno files are present (#2627)"

This reverts commit c1394fd7b37bb0bf06b1449e074020a2e16bfa04.

This was a terrible way of doing this, there's got to be a better way!
2022-07-31 16:29:48 +02:00
..
utils chore: fix typos in comments (#4122) 2022-06-28 14:19:17 -04:00
aws.rs chore(clippy): fix new lints (#4002) 2022-05-23 06:58:27 -04:00
azure.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
battery.rs chore: fix typos in comments (#4122) 2022-06-28 14:19:17 -04:00
buf.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
c.rs chore(clippy): fix new lints (#4002) 2022-05-23 06:58:27 -04:00
character.rs fix(character): Standadise Vim config names (#4081) 2022-06-18 23:23:59 +02:00
cmake.rs chore(clippy): fix new lints (#4002) 2022-05-23 06:58:27 -04:00
cmd_duration.rs feat(cmd_duration): make notify feature optional (compat with nix darwin) (#3855) 2022-04-12 12:07:36 +02:00
cobol.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
conda.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
container.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
crystal.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
custom.rs fix(timings): count time spent on custom on 'when' command failure (#4121) 2022-07-08 16:38:26 +02:00
daml.rs feat: Add support for Daml (#4004) 2022-05-26 16:42:31 +02:00
dart.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
deno.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
directory.rs feat: Add the ability to have some file extensions *prevent* a module from triggering (#4043) 2022-07-31 16:29:48 +02:00
docker_context.rs chore: fix typos in comments (#4122) 2022-06-28 14:19:17 -04:00
dotnet.rs chore(clippy): fix new lints (#4002) 2022-05-23 06:58:27 -04:00
elixir.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
elm.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
env_var.rs chore(clippy): fix new lints (#4002) 2022-05-23 06:58:27 -04:00
erlang.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
fill.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
gcloud.rs chore(clippy): fix new lints (#4002) 2022-05-23 06:58:27 -04:00
git_branch.rs fix(git_branch): correct variable name for remote branch (#3897) 2022-04-26 20:02:01 +02:00
git_commit.rs chore(clippy): fix new lints (#4002) 2022-05-23 06:58:27 -04:00
git_metrics.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
git_state.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
git_status.rs build: bump nix from 0.23.1 to 0.24.1 (#3925) 2022-04-26 09:14:51 -04:00
golang.rs feat(go): check for go.work file to show Go module in prompt (#3968) 2022-05-07 08:04:37 +02:00
haskell.rs perf(package): only try to read files that exist (#3904) 2022-04-25 16:18:01 +02:00
helm.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
hg_branch.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
hostname.rs chore(clippy): fix new lints (#4002) 2022-05-23 06:58:27 -04:00
java.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
jobs.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
julia.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
kotlin.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
kubernetes.rs feat(k8s): Add folder detection to the k8s module. (#4157) 2022-07-10 11:14:54 +02:00
line_break.rs feat: Add a fill module to pad out the line (#3029) 2021-09-12 19:59:15 -04:00
localip.rs chore(clippy): fix new lints (#4002) 2022-05-23 06:58:27 -04:00
lua.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
memory_usage.rs refactor(memory_usage): replace sys-info with systemstat (#4028) 2022-05-29 16:47:06 +02:00
mod.rs feat: add Raku module (#4048) 2022-06-26 12:00:55 +02:00
nim.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
nix_shell.rs chore(clippy): fix new lints (#4002) 2022-05-23 06:58:27 -04:00
nodejs.rs perf(package): only try to read files that exist (#3904) 2022-04-25 16:18:01 +02:00
ocaml.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
openstack.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
package.rs feat(package): support cargo workspace versions (#4161) 2022-07-20 11:17:27 +02:00
perl.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
php.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
pulumi.rs perf(pulumi): allow disabling upwards discovery (#4159) 2022-07-10 11:14:43 +02:00
purescript.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
python.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
raku.rs feat: add Raku module (#4048) 2022-06-26 12:00:55 +02:00
red.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
rlang.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
ruby.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
rust.rs perf(rust): avoid calling rustup in more conditions (#4174) 2022-07-20 11:15:46 +02:00
scala.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
shell.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
shlvl.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
singularity.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
spack.rs feat(spack): Add Spack module (#3639) 2022-04-03 15:33:14 +02:00
status.rs feat(status): Add pipestatus_segment_format option to status module (#4103) 2022-07-19 15:07:50 +02:00
sudo.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
swift.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
terraform.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
time.rs chore(clippy): fix new lints (#4002) 2022-05-23 06:58:27 -04:00
username.rs feat(username): Detect Admin access in Windows (#2791) 2022-04-01 17:47:49 +02:00
vagrant.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
vcsh.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00
vlang.rs chore: fix new clippy lints (#4136) 2022-06-30 16:18:29 -04:00
zig.rs refactor: replace module_config_derive with serde (#3786) 2022-03-26 10:42:19 +01:00