mirror of
https://github.com/IlanCosman/tide.git
synced 2024-12-23 03:52:12 +03:00
Add support for Bun (#485)
* Add support for Bun * Fixes --------- Co-authored-by: Ilan Cosman <ilancosman@gmail.com>
This commit is contained in:
parent
fbca9587ae
commit
57afe578d3
@ -1,5 +1,11 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## [v6.2.0][] (???)
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- Add a new `bun` item ([#485][] - @will-stone)
|
||||||
|
|
||||||
## [v6.1.1][] (Dec 27 2023)
|
## [v6.1.1][] (Dec 27 2023)
|
||||||
|
|
||||||
### Bug fixes
|
### Bug fixes
|
||||||
@ -579,6 +585,7 @@
|
|||||||
[#470]: https://github.com/IlanCosman/tide/issues/470
|
[#470]: https://github.com/IlanCosman/tide/issues/470
|
||||||
[#472]: https://github.com/IlanCosman/tide/issues/472
|
[#472]: https://github.com/IlanCosman/tide/issues/472
|
||||||
[#474]: https://github.com/IlanCosman/tide/issues/474
|
[#474]: https://github.com/IlanCosman/tide/issues/474
|
||||||
|
[#485]: https://github.com/IlanCosman/tide/issues/485
|
||||||
[prettier action]: https://github.com/actionsx/prettier
|
[prettier action]: https://github.com/actionsx/prettier
|
||||||
[super-linter]: https://github.com/github/super-linter
|
[super-linter]: https://github.com/github/super-linter
|
||||||
[v1.0.0]: https://github.com/IlanCosman/tide/tree/v1.0.0
|
[v1.0.0]: https://github.com/IlanCosman/tide/tree/v1.0.0
|
||||||
|
6
functions/_tide_item_bun.fish
Normal file
6
functions/_tide_item_bun.fish
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
function _tide_item_bun
|
||||||
|
if path is $_tide_parent_dirs/bun.lockb
|
||||||
|
bun --version | string match -qr "(?<v>.*)"
|
||||||
|
_tide_print_item bun $tide_bun_icon' ' $v
|
||||||
|
end
|
||||||
|
end
|
@ -1,7 +1,7 @@
|
|||||||
function _tide_remove_unusable_items
|
function _tide_remove_unusable_items
|
||||||
# Remove tool-specific items for tools the machine doesn't have installed
|
# Remove tool-specific items for tools the machine doesn't have installed
|
||||||
set -l removed_items
|
set -l removed_items
|
||||||
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
|
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
|
||||||
contains $item $tide_left_prompt_items $tide_right_prompt_items || continue
|
contains $item $tide_left_prompt_items $tide_right_prompt_items || continue
|
||||||
|
|
||||||
set -l cli_names $item
|
set -l cli_names $item
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
tide_aws_bg_color 444444
|
tide_aws_bg_color 444444
|
||||||
tide_aws_color FF9900
|
tide_aws_color FF9900
|
||||||
|
tide_bun_bg_color 14151A
|
||||||
|
tide_bun_color FBF0DF
|
||||||
tide_character_color $_tide_color_green
|
tide_character_color $_tide_color_green
|
||||||
tide_character_color_failure FF0000
|
tide_character_color_failure FF0000
|
||||||
tide_cmd_duration_bg_color 444444
|
tide_cmd_duration_bg_color 444444
|
||||||
@ -77,11 +79,11 @@ tide_pwd_bg_color 444444
|
|||||||
tide_pwd_color_anchors $_tide_color_light_blue
|
tide_pwd_color_anchors $_tide_color_light_blue
|
||||||
tide_pwd_color_dirs $_tide_color_dark_blue
|
tide_pwd_color_dirs $_tide_color_dark_blue
|
||||||
tide_pwd_color_truncated_dirs 8787AF
|
tide_pwd_color_truncated_dirs 8787AF
|
||||||
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
|
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
|
||||||
tide_python_bg_color 444444
|
tide_python_bg_color 444444
|
||||||
tide_python_color 00AFAF
|
tide_python_color 00AFAF
|
||||||
tide_right_prompt_frame_enabled true
|
tide_right_prompt_frame_enabled true
|
||||||
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
|
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
|
||||||
tide_right_prompt_prefix
|
tide_right_prompt_prefix
|
||||||
tide_right_prompt_separator_diff_color
|
tide_right_prompt_separator_diff_color
|
||||||
tide_right_prompt_separator_same_color
|
tide_right_prompt_separator_same_color
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
tide_aws_bg_color black
|
tide_aws_bg_color black
|
||||||
tide_aws_color yellow
|
tide_aws_color yellow
|
||||||
|
tide_bun_bg_color black
|
||||||
|
tide_bun_color white
|
||||||
tide_character_color brgreen
|
tide_character_color brgreen
|
||||||
tide_character_color_failure brred
|
tide_character_color_failure brred
|
||||||
tide_cmd_duration_bg_color black
|
tide_cmd_duration_bg_color black
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
tide_aws_bg_color normal
|
tide_aws_bg_color normal
|
||||||
tide_aws_color FF9900
|
tide_aws_color FF9900
|
||||||
|
tide_bun_bg_color normal
|
||||||
|
tide_bun_color FBF0DF
|
||||||
tide_character_color $_tide_color_green
|
tide_character_color $_tide_color_green
|
||||||
tide_character_color_failure FF0000
|
tide_character_color_failure FF0000
|
||||||
tide_cmd_duration_bg_color normal
|
tide_cmd_duration_bg_color normal
|
||||||
@ -77,11 +79,11 @@ tide_pwd_bg_color normal
|
|||||||
tide_pwd_color_anchors $_tide_color_light_blue
|
tide_pwd_color_anchors $_tide_color_light_blue
|
||||||
tide_pwd_color_dirs $_tide_color_dark_blue
|
tide_pwd_color_dirs $_tide_color_dark_blue
|
||||||
tide_pwd_color_truncated_dirs 8787AF
|
tide_pwd_color_truncated_dirs 8787AF
|
||||||
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
|
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
|
||||||
tide_python_bg_color normal
|
tide_python_bg_color normal
|
||||||
tide_python_color 00AFAF
|
tide_python_color 00AFAF
|
||||||
tide_right_prompt_frame_enabled false
|
tide_right_prompt_frame_enabled false
|
||||||
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
|
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
|
||||||
tide_right_prompt_prefix ' '
|
tide_right_prompt_prefix ' '
|
||||||
tide_right_prompt_separator_diff_color ' '
|
tide_right_prompt_separator_diff_color ' '
|
||||||
tide_right_prompt_separator_same_color ' '
|
tide_right_prompt_separator_same_color ' '
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
tide_aws_bg_color normal
|
tide_aws_bg_color normal
|
||||||
tide_aws_color yellow
|
tide_aws_color yellow
|
||||||
|
tide_bun_bg_color normal
|
||||||
|
tide_bun_color white
|
||||||
tide_character_color brgreen
|
tide_character_color brgreen
|
||||||
tide_character_color_failure brred
|
tide_character_color_failure brred
|
||||||
tide_cmd_duration_bg_color normal
|
tide_cmd_duration_bg_color normal
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
tide_aws_bg_color FF9900
|
tide_aws_bg_color FF9900
|
||||||
tide_aws_color 232F3E
|
tide_aws_color 232F3E
|
||||||
|
tide_bun_bg_color FBF0DF
|
||||||
|
tide_bun_color 14151A
|
||||||
tide_character_color $_tide_color_green
|
tide_character_color $_tide_color_green
|
||||||
tide_character_color_failure FF0000
|
tide_character_color_failure FF0000
|
||||||
tide_cmd_duration_bg_color C4A000
|
tide_cmd_duration_bg_color C4A000
|
||||||
@ -77,11 +79,11 @@ tide_pwd_bg_color 3465A4
|
|||||||
tide_pwd_color_anchors E4E4E4
|
tide_pwd_color_anchors E4E4E4
|
||||||
tide_pwd_color_dirs E4E4E4
|
tide_pwd_color_dirs E4E4E4
|
||||||
tide_pwd_color_truncated_dirs BCBCBC
|
tide_pwd_color_truncated_dirs BCBCBC
|
||||||
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
|
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
|
||||||
tide_python_bg_color 444444
|
tide_python_bg_color 444444
|
||||||
tide_python_color 00AFAF
|
tide_python_color 00AFAF
|
||||||
tide_right_prompt_frame_enabled true
|
tide_right_prompt_frame_enabled true
|
||||||
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
|
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
|
||||||
tide_right_prompt_prefix
|
tide_right_prompt_prefix
|
||||||
tide_right_prompt_separator_diff_color
|
tide_right_prompt_separator_diff_color
|
||||||
tide_right_prompt_separator_same_color
|
tide_right_prompt_separator_same_color
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
tide_aws_bg_color yellow
|
tide_aws_bg_color yellow
|
||||||
tide_aws_color brblack
|
tide_aws_color brblack
|
||||||
|
tide_bun_bg_color white
|
||||||
|
tide_bun_color black
|
||||||
tide_character_color brgreen
|
tide_character_color brgreen
|
||||||
tide_character_color_failure brred
|
tide_character_color_failure brred
|
||||||
tide_cmd_duration_bg_color yellow
|
tide_cmd_duration_bg_color yellow
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
tide_aws_icon # Actual aws glyph is harder to see
|
tide_aws_icon # Actual aws glyph is harder to see
|
||||||
|
tide_bun_icon
|
||||||
tide_character_icon ❯
|
tide_character_icon ❯
|
||||||
tide_character_vi_icon_default ❮
|
tide_character_vi_icon_default ❮
|
||||||
tide_character_vi_icon_replace ▶
|
tide_character_vi_icon_replace ▶
|
||||||
|
19
tests/_tide_item_bun.test.fish
Normal file
19
tests/_tide_item_bun.test.fish
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# RUN: %fish %s
|
||||||
|
_tide_parent_dirs
|
||||||
|
|
||||||
|
function _bun
|
||||||
|
_tide_decolor (_tide_item_bun)
|
||||||
|
end
|
||||||
|
|
||||||
|
set -l tmpdir (mktemp -d)
|
||||||
|
cd $tmpdir
|
||||||
|
|
||||||
|
mock bun --version "echo 1.0.24"
|
||||||
|
set -lx tide_bun_icon
|
||||||
|
|
||||||
|
_bun # CHECK:
|
||||||
|
|
||||||
|
touch bun.lockb
|
||||||
|
_bun # CHECK: 1.0.24
|
||||||
|
|
||||||
|
command rm -r $tmpdir
|
Loading…
Reference in New Issue
Block a user