Skip to content

Commit 57afe57

Browse files
Add support for Bun (#485)
* Add support for Bun * Fixes --------- Co-authored-by: Ilan Cosman <ilancosman@gmail.com>
1 parent fbca958 commit 57afe57

File tree

11 files changed

+52
-7
lines changed

11 files changed

+52
-7
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## [v6.2.0][] (???)
4+
5+
### Features
6+
7+
- Add a new `bun` item ([#485][] - @will-stone)
8+
39
## [v6.1.1][] (Dec 27 2023)
410

511
### Bug fixes
@@ -579,6 +585,7 @@
579585
[#470]: https://github.com/IlanCosman/tide/issues/470
580586
[#472]: https://github.com/IlanCosman/tide/issues/472
581587
[#474]: https://github.com/IlanCosman/tide/issues/474
588+
[#485]: https://github.com/IlanCosman/tide/issues/485
582589
[prettier action]: https://github.com/actionsx/prettier
583590
[super-linter]: https://github.com/github/super-linter
584591
[v1.0.0]: https://github.com/IlanCosman/tide/tree/v1.0.0

functions/_tide_item_bun.fish

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
function _tide_item_bun
2+
if path is $_tide_parent_dirs/bun.lockb
3+
bun --version | string match -qr "(?<v>.*)"
4+
_tide_print_item bun $tide_bun_icon' ' $v
5+
end
6+
end

functions/_tide_remove_unusable_items.fish

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
function _tide_remove_unusable_items
22
# Remove tool-specific items for tools the machine doesn't have installed
33
set -l removed_items
4-
for item in aws crystal direnv distrobox docker elixir gcloud git go java kubectl nix_shell node php pulumi python ruby rustc terraform toolbox zig
4+
for item in aws bun crystal direnv distrobox docker elixir gcloud git go java kubectl nix_shell node php pulumi python ruby rustc terraform toolbox zig
55
contains $item $tide_left_prompt_items $tide_right_prompt_items || continue
66

77
set -l cli_names $item

functions/tide/configure/configs/classic.fish

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
tide_aws_bg_color 444444
22
tide_aws_color FF9900
3+
tide_bun_bg_color 14151A
4+
tide_bun_color FBF0DF
35
tide_character_color $_tide_color_green
46
tide_character_color_failure FF0000
57
tide_cmd_duration_bg_color 444444
@@ -77,11 +79,11 @@ tide_pwd_bg_color 444444
7779
tide_pwd_color_anchors $_tide_color_light_blue
7880
tide_pwd_color_dirs $_tide_color_dark_blue
7981
tide_pwd_color_truncated_dirs 8787AF
80-
tide_pwd_markers .bzr .citc .git .hg .node-version .python-version .ruby-version .shorten_folder_marker .svn .terraform Cargo.toml composer.json CVS go.mod package.json build.zig
82+
tide_pwd_markers .bzr .citc .git .hg .node-version .python-version .ruby-version .shorten_folder_marker .svn .terraform bun.lockb Cargo.toml composer.json CVS go.mod package.json build.zig
8183
tide_python_bg_color 444444
8284
tide_python_color 00AFAF
8385
tide_right_prompt_frame_enabled true
84-
tide_right_prompt_items status cmd_duration context jobs direnv node python rustc java php pulumi ruby go gcloud kubectl distrobox toolbox terraform aws nix_shell crystal elixir zig
86+
tide_right_prompt_items status cmd_duration context jobs direnv bun node python rustc java php pulumi ruby go gcloud kubectl distrobox toolbox terraform aws nix_shell crystal elixir zig
8587
tide_right_prompt_prefix 
8688
tide_right_prompt_separator_diff_color 
8789
tide_right_prompt_separator_same_color 

functions/tide/configure/configs/classic_16color.fish

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
tide_aws_bg_color black
22
tide_aws_color yellow
3+
tide_bun_bg_color black
4+
tide_bun_color white
35
tide_character_color brgreen
46
tide_character_color_failure brred
57
tide_cmd_duration_bg_color black

functions/tide/configure/configs/lean.fish

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
tide_aws_bg_color normal
22
tide_aws_color FF9900
3+
tide_bun_bg_color normal
4+
tide_bun_color FBF0DF
35
tide_character_color $_tide_color_green
46
tide_character_color_failure FF0000
57
tide_cmd_duration_bg_color normal
@@ -77,11 +79,11 @@ tide_pwd_bg_color normal
7779
tide_pwd_color_anchors $_tide_color_light_blue
7880
tide_pwd_color_dirs $_tide_color_dark_blue
7981
tide_pwd_color_truncated_dirs 8787AF
80-
tide_pwd_markers .bzr .citc .git .hg .node-version .python-version .ruby-version .shorten_folder_marker .svn .terraform Cargo.toml composer.json CVS go.mod package.json build.zig
82+
tide_pwd_markers .bzr .citc .git .hg .node-version .python-version .ruby-version .shorten_folder_marker .svn .terraform bun.lockb Cargo.toml composer.json CVS go.mod package.json build.zig
8183
tide_python_bg_color normal
8284
tide_python_color 00AFAF
8385
tide_right_prompt_frame_enabled false
84-
tide_right_prompt_items status cmd_duration context jobs direnv node python rustc java php pulumi ruby go gcloud kubectl distrobox toolbox terraform aws nix_shell crystal elixir zig
86+
tide_right_prompt_items status cmd_duration context jobs direnv bun node python rustc java php pulumi ruby go gcloud kubectl distrobox toolbox terraform aws nix_shell crystal elixir zig
8587
tide_right_prompt_prefix ' '
8688
tide_right_prompt_separator_diff_color ' '
8789
tide_right_prompt_separator_same_color ' '

functions/tide/configure/configs/lean_16color.fish

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
tide_aws_bg_color normal
22
tide_aws_color yellow
3+
tide_bun_bg_color normal
4+
tide_bun_color white
35
tide_character_color brgreen
46
tide_character_color_failure brred
57
tide_cmd_duration_bg_color normal

functions/tide/configure/configs/rainbow.fish

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
tide_aws_bg_color FF9900
22
tide_aws_color 232F3E
3+
tide_bun_bg_color FBF0DF
4+
tide_bun_color 14151A
35
tide_character_color $_tide_color_green
46
tide_character_color_failure FF0000
57
tide_cmd_duration_bg_color C4A000
@@ -77,11 +79,11 @@ tide_pwd_bg_color 3465A4
7779
tide_pwd_color_anchors E4E4E4
7880
tide_pwd_color_dirs E4E4E4
7981
tide_pwd_color_truncated_dirs BCBCBC
80-
tide_pwd_markers .bzr .citc .git .hg .node-version .python-version .ruby-version .shorten_folder_marker .svn .terraform Cargo.toml composer.json CVS go.mod package.json build.zig
82+
tide_pwd_markers .bzr .citc .git .hg .node-version .python-version .ruby-version .shorten_folder_marker .svn .terraform bun.lockb Cargo.toml composer.json CVS go.mod package.json build.zig
8183
tide_python_bg_color 444444
8284
tide_python_color 00AFAF
8385
tide_right_prompt_frame_enabled true
84-
tide_right_prompt_items status cmd_duration context jobs direnv node python rustc java php pulumi ruby go gcloud kubectl distrobox toolbox terraform aws nix_shell crystal elixir zig
86+
tide_right_prompt_items status cmd_duration context jobs direnv bun node python rustc java php pulumi ruby go gcloud kubectl distrobox toolbox terraform aws nix_shell crystal elixir zig
8587
tide_right_prompt_prefix 
8688
tide_right_prompt_separator_diff_color 
8789
tide_right_prompt_separator_same_color 

functions/tide/configure/configs/rainbow_16color.fish

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
tide_aws_bg_color yellow
22
tide_aws_color brblack
3+
tide_bun_bg_color white
4+
tide_bun_color black
35
tide_character_color brgreen
46
tide_character_color_failure brred
57
tide_cmd_duration_bg_color yellow

functions/tide/configure/icons.fish

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
tide_aws_icon  # Actual aws glyph is harder to see
2+
tide_bun_icon 󰳓
23
tide_character_icon ❯
34
tide_character_vi_icon_default ❮
45
tide_character_vi_icon_replace ▶

0 commit comments

Comments
 (0)