From 2ea2cc71596e14a6a64601e7500726067472f9a4 Mon Sep 17 00:00:00 2001 From: Tim Date: Fri, 12 Dec 2025 18:54:49 +0100 Subject: [PATCH] Update fish tide --- .../{tide => }/_tide_1_line_prompt.fish | 0 .../{tide => }/_tide_2_line_prompt.fish | 0 .../{tide => }/_tide_cache_variables.fish | 0 .../functions/{tide => }/_tide_detect_os.fish | 3 +- .../{tide => }/_tide_find_and_remove.fish | 0 .../{tide => }/_tide_fish_colorize.fish | 0 .../functions/{tide => }/_tide_item_aws.fish | 0 .../fish/functions/_tide_item_bun.fish | 6 ++++ .../{tide => }/_tide_item_character.fish | 0 .../{tide => }/_tide_item_cmd_duration.fish | 0 .../{tide => }/_tide_item_context.fish | 0 .../{tide => }/_tide_item_crystal.fish | 0 .../{tide => }/_tide_item_direnv.fish | 0 .../{tide => }/_tide_item_distrobox.fish | 0 .../{tide => }/_tide_item_docker.fish | 0 .../{tide => }/_tide_item_elixir.fish | 0 .../{tide => }/_tide_item_gcloud.fish | 0 .../functions/{tide => }/_tide_item_git.fish | 2 +- .../functions/{tide => }/_tide_item_go.fish | 0 .../functions/{tide => }/_tide_item_java.fish | 0 .../functions/{tide => }/_tide_item_jobs.fish | 0 .../{tide => }/_tide_item_kubectl.fish | 0 .../{tide => }/_tide_item_nix_shell.fish | 0 .../functions/{tide => }/_tide_item_node.fish | 0 .../functions/{tide => }/_tide_item_os.fish | 0 .../functions/{tide => }/_tide_item_php.fish | 0 .../{tide => }/_tide_item_private_mode.fish | 0 .../{tide => }/_tide_item_pulumi.fish | 0 .../{tide => }/_tide_item_python.fish | 0 .../functions/{tide => }/_tide_item_ruby.fish | 0 .../{tide => }/_tide_item_rustc.fish | 0 .../{tide => }/_tide_item_shlvl.fish | 0 .../{tide => }/_tide_item_status.fish | 0 .../{tide => }/_tide_item_terraform.fish | 0 .../functions/{tide => }/_tide_item_time.fish | 0 .../{tide => }/_tide_item_toolbox.fish | 0 .../{tide => }/_tide_item_vi_mode.fish | 0 .../functions/{tide => }/_tide_item_zig.fish | 0 .../fish/functions/_tide_parent_dirs.fish | 10 +++++++ .../{tide => }/_tide_print_item.fish | 0 .../fish/functions/{tide => }/_tide_pwd.fish | 0 .../_tide_remove_unusable_items.fish | 2 +- .../{tide => }/_tide_sub_bug-report.fish | 30 +++++++++---------- .../{tide => }/_tide_sub_configure.fish | 0 .../{tide => }/_tide_sub_reload.fish | 0 fish/.config/fish/functions/fish_prompt.fish | 23 +++++++------- fish/.config/fish/functions/tide.fish | 2 +- .../functions/tide/_tide_parent_dirs.fish | 7 ----- .../tide/configure/configs/classic.fish | 6 ++-- .../configure/configs/classic_16color.fish | 2 ++ .../tide/configure/configs/lean.fish | 6 ++-- .../tide/configure/configs/lean_16color.fish | 2 ++ .../tide/configure/configs/rainbow.fish | 6 ++-- .../configure/configs/rainbow_16color.fish | 2 ++ .../fish/functions/tide/configure/icons.fish | 1 + 55 files changed, 65 insertions(+), 45 deletions(-) rename fish/.config/fish/functions/{tide => }/_tide_1_line_prompt.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_2_line_prompt.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_cache_variables.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_detect_os.fish (94%) rename fish/.config/fish/functions/{tide => }/_tide_find_and_remove.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_fish_colorize.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_aws.fish (100%) create mode 100644 fish/.config/fish/functions/_tide_item_bun.fish rename fish/.config/fish/functions/{tide => }/_tide_item_character.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_cmd_duration.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_context.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_crystal.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_direnv.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_distrobox.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_docker.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_elixir.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_gcloud.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_git.fish (98%) rename fish/.config/fish/functions/{tide => }/_tide_item_go.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_java.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_jobs.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_kubectl.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_nix_shell.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_node.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_os.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_php.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_private_mode.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_pulumi.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_python.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_ruby.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_rustc.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_shlvl.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_status.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_terraform.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_time.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_toolbox.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_vi_mode.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_item_zig.fish (100%) create mode 100644 fish/.config/fish/functions/_tide_parent_dirs.fish rename fish/.config/fish/functions/{tide => }/_tide_print_item.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_pwd.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_remove_unusable_items.fish (85%) rename fish/.config/fish/functions/{tide => }/_tide_sub_bug-report.fish (62%) rename fish/.config/fish/functions/{tide => }/_tide_sub_configure.fish (100%) rename fish/.config/fish/functions/{tide => }/_tide_sub_reload.fish (100%) delete mode 100644 fish/.config/fish/functions/tide/_tide_parent_dirs.fish diff --git a/fish/.config/fish/functions/tide/_tide_1_line_prompt.fish b/fish/.config/fish/functions/_tide_1_line_prompt.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_1_line_prompt.fish rename to fish/.config/fish/functions/_tide_1_line_prompt.fish diff --git a/fish/.config/fish/functions/tide/_tide_2_line_prompt.fish b/fish/.config/fish/functions/_tide_2_line_prompt.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_2_line_prompt.fish rename to fish/.config/fish/functions/_tide_2_line_prompt.fish diff --git a/fish/.config/fish/functions/tide/_tide_cache_variables.fish b/fish/.config/fish/functions/_tide_cache_variables.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_cache_variables.fish rename to fish/.config/fish/functions/_tide_cache_variables.fish diff --git a/fish/.config/fish/functions/tide/_tide_detect_os.fish b/fish/.config/fish/functions/_tide_detect_os.fish similarity index 94% rename from fish/.config/fish/functions/tide/_tide_detect_os.fish rename to fish/.config/fish/functions/_tide_detect_os.fish index cf38388..bb58d07 100644 --- a/fish/.config/fish/functions/tide/_tide_detect_os.fish +++ b/fish/.config/fish/functions/_tide_detect_os.fish @@ -10,9 +10,8 @@ function _tide_detect_os printf %s\n  FFFFFF 00CCFF # https://answers.microsoft.com/en-us/windows/forum/all/what-is-the-official-windows-8-blue-rgb-or-hex/fd57144b-f69b-42d8-8c21-6ca911646e44 case linux if test (uname -o) = Android - echo ﲎ # This character is evil and messes up code display, so it's put on its own line # https://developer.android.com/distribute/marketing-tools/brand-guidelines - printf %s\n 3DDC84 3C3F41 # fg is from above link, bg is from Android Studio default dark theme + printf %s\n  3DDC84 3C3F41 # fg is from above link, bg is from Android Studio default dark theme else _tide_detect_os_linux_cases /etc/os-release ID || _tide_detect_os_linux_cases /etc/os-release ID_LIKE || diff --git a/fish/.config/fish/functions/tide/_tide_find_and_remove.fish b/fish/.config/fish/functions/_tide_find_and_remove.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_find_and_remove.fish rename to fish/.config/fish/functions/_tide_find_and_remove.fish diff --git a/fish/.config/fish/functions/tide/_tide_fish_colorize.fish b/fish/.config/fish/functions/_tide_fish_colorize.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_fish_colorize.fish rename to fish/.config/fish/functions/_tide_fish_colorize.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_aws.fish b/fish/.config/fish/functions/_tide_item_aws.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_aws.fish rename to fish/.config/fish/functions/_tide_item_aws.fish diff --git a/fish/.config/fish/functions/_tide_item_bun.fish b/fish/.config/fish/functions/_tide_item_bun.fish new file mode 100644 index 0000000..b39fd72 --- /dev/null +++ b/fish/.config/fish/functions/_tide_item_bun.fish @@ -0,0 +1,6 @@ +function _tide_item_bun + if path is $_tide_parent_dirs/bun.lockb + bun --version | string match -qr "(?.*)" + _tide_print_item bun $tide_bun_icon' ' $v + end +end diff --git a/fish/.config/fish/functions/tide/_tide_item_character.fish b/fish/.config/fish/functions/_tide_item_character.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_character.fish rename to fish/.config/fish/functions/_tide_item_character.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_cmd_duration.fish b/fish/.config/fish/functions/_tide_item_cmd_duration.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_cmd_duration.fish rename to fish/.config/fish/functions/_tide_item_cmd_duration.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_context.fish b/fish/.config/fish/functions/_tide_item_context.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_context.fish rename to fish/.config/fish/functions/_tide_item_context.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_crystal.fish b/fish/.config/fish/functions/_tide_item_crystal.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_crystal.fish rename to fish/.config/fish/functions/_tide_item_crystal.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_direnv.fish b/fish/.config/fish/functions/_tide_item_direnv.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_direnv.fish rename to fish/.config/fish/functions/_tide_item_direnv.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_distrobox.fish b/fish/.config/fish/functions/_tide_item_distrobox.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_distrobox.fish rename to fish/.config/fish/functions/_tide_item_distrobox.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_docker.fish b/fish/.config/fish/functions/_tide_item_docker.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_docker.fish rename to fish/.config/fish/functions/_tide_item_docker.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_elixir.fish b/fish/.config/fish/functions/_tide_item_elixir.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_elixir.fish rename to fish/.config/fish/functions/_tide_item_elixir.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_gcloud.fish b/fish/.config/fish/functions/_tide_item_gcloud.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_gcloud.fish rename to fish/.config/fish/functions/_tide_item_gcloud.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_git.fish b/fish/.config/fish/functions/_tide_item_git.fish similarity index 98% rename from fish/.config/fish/functions/tide/_tide_item_git.fish rename to fish/.config/fish/functions/_tide_item_git.fish index 3154acc..56e1e31 100644 --- a/fish/.config/fish/functions/tide/_tide_item_git.fish +++ b/fish/.config/fish/functions/_tide_item_git.fish @@ -50,7 +50,7 @@ function _tide_item_git (0|(?.*))\n(0|(?.*))(\n(0|(?.*))\t(0|(?.*)))?' \ "$(git $_set_dir_opt stash list 2>/dev/null | count string match -r ^UU $stat | count - string match -r ^[ADMR]. $stat | count + string match -r ^[ADMR] $stat | count string match -r ^.[ADMR] $stat | count string match -r '^\?\?' $stat | count git rev-list --count --left-right @{upstream}...HEAD 2>/dev/null)" diff --git a/fish/.config/fish/functions/tide/_tide_item_go.fish b/fish/.config/fish/functions/_tide_item_go.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_go.fish rename to fish/.config/fish/functions/_tide_item_go.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_java.fish b/fish/.config/fish/functions/_tide_item_java.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_java.fish rename to fish/.config/fish/functions/_tide_item_java.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_jobs.fish b/fish/.config/fish/functions/_tide_item_jobs.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_jobs.fish rename to fish/.config/fish/functions/_tide_item_jobs.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_kubectl.fish b/fish/.config/fish/functions/_tide_item_kubectl.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_kubectl.fish rename to fish/.config/fish/functions/_tide_item_kubectl.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_nix_shell.fish b/fish/.config/fish/functions/_tide_item_nix_shell.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_nix_shell.fish rename to fish/.config/fish/functions/_tide_item_nix_shell.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_node.fish b/fish/.config/fish/functions/_tide_item_node.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_node.fish rename to fish/.config/fish/functions/_tide_item_node.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_os.fish b/fish/.config/fish/functions/_tide_item_os.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_os.fish rename to fish/.config/fish/functions/_tide_item_os.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_php.fish b/fish/.config/fish/functions/_tide_item_php.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_php.fish rename to fish/.config/fish/functions/_tide_item_php.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_private_mode.fish b/fish/.config/fish/functions/_tide_item_private_mode.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_private_mode.fish rename to fish/.config/fish/functions/_tide_item_private_mode.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_pulumi.fish b/fish/.config/fish/functions/_tide_item_pulumi.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_pulumi.fish rename to fish/.config/fish/functions/_tide_item_pulumi.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_python.fish b/fish/.config/fish/functions/_tide_item_python.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_python.fish rename to fish/.config/fish/functions/_tide_item_python.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_ruby.fish b/fish/.config/fish/functions/_tide_item_ruby.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_ruby.fish rename to fish/.config/fish/functions/_tide_item_ruby.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_rustc.fish b/fish/.config/fish/functions/_tide_item_rustc.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_rustc.fish rename to fish/.config/fish/functions/_tide_item_rustc.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_shlvl.fish b/fish/.config/fish/functions/_tide_item_shlvl.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_shlvl.fish rename to fish/.config/fish/functions/_tide_item_shlvl.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_status.fish b/fish/.config/fish/functions/_tide_item_status.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_status.fish rename to fish/.config/fish/functions/_tide_item_status.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_terraform.fish b/fish/.config/fish/functions/_tide_item_terraform.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_terraform.fish rename to fish/.config/fish/functions/_tide_item_terraform.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_time.fish b/fish/.config/fish/functions/_tide_item_time.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_time.fish rename to fish/.config/fish/functions/_tide_item_time.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_toolbox.fish b/fish/.config/fish/functions/_tide_item_toolbox.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_toolbox.fish rename to fish/.config/fish/functions/_tide_item_toolbox.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_vi_mode.fish b/fish/.config/fish/functions/_tide_item_vi_mode.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_vi_mode.fish rename to fish/.config/fish/functions/_tide_item_vi_mode.fish diff --git a/fish/.config/fish/functions/tide/_tide_item_zig.fish b/fish/.config/fish/functions/_tide_item_zig.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_item_zig.fish rename to fish/.config/fish/functions/_tide_item_zig.fish diff --git a/fish/.config/fish/functions/_tide_parent_dirs.fish b/fish/.config/fish/functions/_tide_parent_dirs.fish new file mode 100644 index 0000000..00d8a14 --- /dev/null +++ b/fish/.config/fish/functions/_tide_parent_dirs.fish @@ -0,0 +1,10 @@ +function _tide_parent_dirs --on-variable PWD + set -g _tide_parent_dirs ( + string escape ( + for dir in (string split / -- $PWD) + set -fa parts $dir + string join / -- $parts + end + ) + ) +end diff --git a/fish/.config/fish/functions/tide/_tide_print_item.fish b/fish/.config/fish/functions/_tide_print_item.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_print_item.fish rename to fish/.config/fish/functions/_tide_print_item.fish diff --git a/fish/.config/fish/functions/tide/_tide_pwd.fish b/fish/.config/fish/functions/_tide_pwd.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_pwd.fish rename to fish/.config/fish/functions/_tide_pwd.fish diff --git a/fish/.config/fish/functions/tide/_tide_remove_unusable_items.fish b/fish/.config/fish/functions/_tide_remove_unusable_items.fish similarity index 85% rename from fish/.config/fish/functions/tide/_tide_remove_unusable_items.fish rename to fish/.config/fish/functions/_tide_remove_unusable_items.fish index deb4c10..b1d9b28 100644 --- a/fish/.config/fish/functions/tide/_tide_remove_unusable_items.fish +++ b/fish/.config/fish/functions/_tide_remove_unusable_items.fish @@ -1,7 +1,7 @@ function _tide_remove_unusable_items # Remove tool-specific items for tools the machine doesn't have installed 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 set -l cli_names $item diff --git a/fish/.config/fish/functions/tide/_tide_sub_bug-report.fish b/fish/.config/fish/functions/_tide_sub_bug-report.fish similarity index 62% rename from fish/.config/fish/functions/tide/_tide_sub_bug-report.fish rename to fish/.config/fish/functions/_tide_sub_bug-report.fish index a8065c8..82f08c0 100644 --- a/fish/.config/fish/functions/tide/_tide_sub_bug-report.fish +++ b/fish/.config/fish/functions/_tide_sub_bug-report.fish @@ -11,14 +11,14 @@ function _tide_sub_bug-report set --long | string match -r "^_?tide.*" | # Get only tide variables string match -r --invert "^_tide_prompt_var.*" # Remove _tide_prompt_var else - set -l fish_version ($fish_path --version | string match -r "fish, version (\d\.\d\.\d)")[2] - _tide_check_version Fish fish-shell/fish-shell "(\d\.\d\.\d)" $fish_version || return + $fish_path --version | string match -qr "fish, version (?.*)" + _tide_check_version Fish fish-shell/fish-shell "(?[\d.]+)" $fish_version || return - set -l tide_version (tide --version | string match -r "tide, version (\d\.\d\.\d)")[2] - _tide_check_version Tide IlanCosman/tide "v(\d\.\d\.\d)" $tide_version || return + tide --version | string match -qr "tide, version (?.*)" + _tide_check_version Tide IlanCosman/tide "v(?[\d.]+)" $tide_version || return if command --query git - test (git --version | string match -r "git version ([\d\.]*)" | string replace --all . '')[2] -gt 2220 + test (path sort (git --version) "git version 2.22.0")[1] = "git version 2.22.0" _tide_check_condition \ "Your git version is too old." \ "Tide requires at least version 2.22." \ @@ -32,11 +32,12 @@ function _tide_sub_bug-report "Please uninstall it before submitting a bug report." || return if not set -q _flag_check - set -l fish_startup_time ($fish_path -ic "time $fish_path -c exit" 2>| - string match -r "Executed in(.*)fish" | string trim)[2] + $fish_path -ic "time $fish_path -c exit" 2>| + string match -rg "Executed in(.*)fish" | + string trim | read -l fish_startup_time - read --local --prompt-str "What operating system are you using? (e.g Ubuntu 20.04): " os - read --local --prompt-str "What terminal emulator are you using? (e.g Kitty): " terminal_emulator + read -l --prompt-str "What operating system are you using? (e.g Ubuntu 20.04): " os + read -l --prompt-str "What terminal emulator are you using? (e.g Kitty): " terminal_emulator printf '%b\n' "\nPlease copy the following information into the issue:\n" \ "fish version: $fish_version" \ @@ -50,15 +51,14 @@ function _tide_sub_bug-report end end -function _tide_check_version -a program_name repo_name regex_to_get_version current_version - curl --silent https://github.com/$repo_name/releases/latest | - string match -r ".*$repo_name/releases/tag/$regex_to_get_version.*" | - read --local --line __ latestVersion +function _tide_check_version -a program_name repo_name regex_to_get_v installed_version + curl -sL https://github.com/$repo_name/releases/latest | + string match -qr "https://github.com/$repo_name/releases/tag/$regex_to_get_v" - string match --quiet -r "^$latestVersion" "$current_version" + string match -qr "^$v" "$installed_version" # Allow git versions, e.g 3.3.1-701-gceade1629 _tide_check_condition \ "Your $program_name version is out of date." \ - "The latest is $latestVersion. You have $current_version." \ + "The latest is $v. You have $installed_version." \ "Please update before submitting a bug report." end diff --git a/fish/.config/fish/functions/tide/_tide_sub_configure.fish b/fish/.config/fish/functions/_tide_sub_configure.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_sub_configure.fish rename to fish/.config/fish/functions/_tide_sub_configure.fish diff --git a/fish/.config/fish/functions/tide/_tide_sub_reload.fish b/fish/.config/fish/functions/_tide_sub_reload.fish similarity index 100% rename from fish/.config/fish/functions/tide/_tide_sub_reload.fish rename to fish/.config/fish/functions/_tide_sub_reload.fish diff --git a/fish/.config/fish/functions/fish_prompt.fish b/fish/.config/fish/functions/fish_prompt.fish index 3b58b7b..994513d 100644 --- a/fish/.config/fish/functions/fish_prompt.fish +++ b/fish/.config/fish/functions/fish_prompt.fish @@ -28,7 +28,7 @@ if contains newline $_tide_left_items # two line prompt initialization test "$tide_left_prompt_frame_enabled" = true && set -l top_left_frame "$prompt_and_frame_color╭─" && set -l bot_left_frame "$prompt_and_frame_color╰─" && - set column_offset (math $column_offset-2) + set column_offset 3 test "$tide_right_prompt_frame_enabled" = true && set -l top_right_frame "$prompt_and_frame_color─╮" && set -l bot_right_frame "$prompt_and_frame_color─╯" && @@ -145,21 +145,20 @@ end" end end -eval "function _tide_on_fish_exit --on-event fish_exit +# Inheriting instead of evaling because here load time is more important than runtime +function _tide_on_fish_exit --on-event fish_exit --inherit-variable prompt_var set -e $prompt_var -end" +end if test "$tide_prompt_transient_enabled" = true function _tide_enter_transient - # If the commandline will be executed, or is empty - if commandline --is-valid || test -z "$(commandline)" - # Pager open usually means selecting, not running - # Can be untrue, but it's better than the alternative - if not commandline --paging-mode - set -g _tide_transient - set -g _tide_repaint - commandline -f repaint - end + # If the commandline will be executed or is empty, and the pager is not open + # Pager open usually means selecting, not running + # Can be untrue, but it's better than the alternative + if commandline --is-valid || test -z "$(commandline)" && not commandline --paging-mode + set -g _tide_transient + set -g _tide_repaint + commandline -f repaint end commandline -f execute end diff --git a/fish/.config/fish/functions/tide.fish b/fish/.config/fish/functions/tide.fish index 092a722..4b115a1 100644 --- a/fish/.config/fish/functions/tide.fish +++ b/fish/.config/fish/functions/tide.fish @@ -2,7 +2,7 @@ function tide --description 'Manage your Tide prompt' argparse --stop-nonopt v/version h/help -- $argv if set -q _flag_version - echo 'tide, version 6.1.1' + echo 'tide, version 6.2.0' else if set -q _flag_help _tide_help else if functions --query _tide_sub_$argv[1] diff --git a/fish/.config/fish/functions/tide/_tide_parent_dirs.fish b/fish/.config/fish/functions/tide/_tide_parent_dirs.fish deleted file mode 100644 index 9f31b04..0000000 --- a/fish/.config/fish/functions/tide/_tide_parent_dirs.fish +++ /dev/null @@ -1,7 +0,0 @@ -function _tide_parent_dirs --on-variable PWD - set -g _tide_parent_dirs (string escape ( - for dir in (string split / -- $PWD) - set -la parts $dir - string join / -- $parts - end)) -end diff --git a/fish/.config/fish/functions/tide/configure/configs/classic.fish b/fish/.config/fish/functions/tide/configure/configs/classic.fish index 8973cbc..6f09bba 100644 --- a/fish/.config/fish/functions/tide/configure/configs/classic.fish +++ b/fish/.config/fish/functions/tide/configure/configs/classic.fish @@ -1,5 +1,7 @@ tide_aws_bg_color 444444 tide_aws_color FF9900 +tide_bun_bg_color 14151A +tide_bun_color FBF0DF tide_character_color $_tide_color_green tide_character_color_failure FF0000 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_dirs $_tide_color_dark_blue 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_color 00AFAF 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_separator_diff_color  tide_right_prompt_separator_same_color  diff --git a/fish/.config/fish/functions/tide/configure/configs/classic_16color.fish b/fish/.config/fish/functions/tide/configure/configs/classic_16color.fish index 670170f..fe730c5 100644 --- a/fish/.config/fish/functions/tide/configure/configs/classic_16color.fish +++ b/fish/.config/fish/functions/tide/configure/configs/classic_16color.fish @@ -1,5 +1,7 @@ tide_aws_bg_color black tide_aws_color yellow +tide_bun_bg_color black +tide_bun_color white tide_character_color brgreen tide_character_color_failure brred tide_cmd_duration_bg_color black diff --git a/fish/.config/fish/functions/tide/configure/configs/lean.fish b/fish/.config/fish/functions/tide/configure/configs/lean.fish index a958a17..db3f1d2 100644 --- a/fish/.config/fish/functions/tide/configure/configs/lean.fish +++ b/fish/.config/fish/functions/tide/configure/configs/lean.fish @@ -1,5 +1,7 @@ tide_aws_bg_color normal tide_aws_color FF9900 +tide_bun_bg_color normal +tide_bun_color FBF0DF tide_character_color $_tide_color_green tide_character_color_failure FF0000 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_dirs $_tide_color_dark_blue 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_color 00AFAF 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_separator_diff_color ' ' tide_right_prompt_separator_same_color ' ' diff --git a/fish/.config/fish/functions/tide/configure/configs/lean_16color.fish b/fish/.config/fish/functions/tide/configure/configs/lean_16color.fish index 16c2511..699ce45 100644 --- a/fish/.config/fish/functions/tide/configure/configs/lean_16color.fish +++ b/fish/.config/fish/functions/tide/configure/configs/lean_16color.fish @@ -1,5 +1,7 @@ tide_aws_bg_color normal tide_aws_color yellow +tide_bun_bg_color normal +tide_bun_color white tide_character_color brgreen tide_character_color_failure brred tide_cmd_duration_bg_color normal diff --git a/fish/.config/fish/functions/tide/configure/configs/rainbow.fish b/fish/.config/fish/functions/tide/configure/configs/rainbow.fish index 60c1592..79e9cb4 100644 --- a/fish/.config/fish/functions/tide/configure/configs/rainbow.fish +++ b/fish/.config/fish/functions/tide/configure/configs/rainbow.fish @@ -1,5 +1,7 @@ tide_aws_bg_color FF9900 tide_aws_color 232F3E +tide_bun_bg_color FBF0DF +tide_bun_color 14151A tide_character_color $_tide_color_green tide_character_color_failure FF0000 tide_cmd_duration_bg_color C4A000 @@ -77,11 +79,11 @@ tide_pwd_bg_color 3465A4 tide_pwd_color_anchors E4E4E4 tide_pwd_color_dirs E4E4E4 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_color 00AFAF 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_separator_diff_color  tide_right_prompt_separator_same_color  diff --git a/fish/.config/fish/functions/tide/configure/configs/rainbow_16color.fish b/fish/.config/fish/functions/tide/configure/configs/rainbow_16color.fish index a040f58..5d20611 100644 --- a/fish/.config/fish/functions/tide/configure/configs/rainbow_16color.fish +++ b/fish/.config/fish/functions/tide/configure/configs/rainbow_16color.fish @@ -1,5 +1,7 @@ tide_aws_bg_color yellow tide_aws_color brblack +tide_bun_bg_color white +tide_bun_color black tide_character_color brgreen tide_character_color_failure brred tide_cmd_duration_bg_color yellow diff --git a/fish/.config/fish/functions/tide/configure/icons.fish b/fish/.config/fish/functions/tide/configure/icons.fish index 70611cd..a687bed 100644 --- a/fish/.config/fish/functions/tide/configure/icons.fish +++ b/fish/.config/fish/functions/tide/configure/icons.fish @@ -1,4 +1,5 @@ tide_aws_icon  # Actual aws glyph is harder to see +tide_bun_icon 󰳓 tide_character_icon ❯ tide_character_vi_icon_default ❮ tide_character_vi_icon_replace ▶