mirror of
https://github.com/IlanCosman/tide.git
synced 2024-12-23 12:03:48 +03:00
Rename some variables, minor edits
This commit is contained in:
parent
8d962710ba
commit
295933d579
@ -113,7 +113,6 @@ Open each file and click "Install". This will make the `MesloLGS NF` font availa
|
||||
[documentation]: https://github.com/IlanCosman/tide/wiki
|
||||
[extensible]: https://raw.githubusercontent.com/IlanCosman/tide-resources/master/images/Extensible.png
|
||||
[fish]: https://fishshell.com/
|
||||
[fish_git_prompt]: https://fishshell.com/docs/current/cmds/fish_git_prompt.html
|
||||
[fish_version_badge]: https://img.shields.io/badge/fish-3.1.0%2B-blue
|
||||
[git]: https://git-scm.com/
|
||||
[license]: LICENSE.md
|
||||
|
@ -1,7 +1,7 @@
|
||||
function _tide_item_status
|
||||
if string match --quiet --invert '0' $_tide_last_pipestatus # If there is a failure anywhere in the pipestatus
|
||||
if test "$_tide_last_pipestatus" = '1'
|
||||
if test "$tide_status_always_display_icon" = 'true'
|
||||
if test "$tide_status_always_display" = 'true'
|
||||
set -g tide_status_bg_color $tide_status_failure_bg_color
|
||||
set_color $tide_status_failure_color
|
||||
printf '%s' {$tide_status_failure_icon}' ' '1'
|
||||
@ -20,7 +20,7 @@ function _tide_item_status
|
||||
end
|
||||
|
||||
__fish_pipestatus_with_signal $_tide_last_pipestatus | string replace 'SIG' '' | string join '|'
|
||||
else if test "$tide_status_always_display_icon" = 'true'
|
||||
else if test "$tide_status_always_display" = 'true'
|
||||
set -g tide_status_bg_color $tide_status_success_bg_color
|
||||
set_color $tide_status_success_color
|
||||
printf '%s' $tide_status_success_icon
|
||||
|
@ -4,9 +4,9 @@ function _tide_item_virtual_env
|
||||
|
||||
set -l splitVirtualEnv (string split '/' "$VIRTUAL_ENV")
|
||||
|
||||
if test "$tide_virtual_env_display" = 'projectName'
|
||||
if test "$tide_virtual_env_display_mode" = 'projectName'
|
||||
printf '%s' {$tide_virtual_env_icon}' ' $splitVirtualEnv[-2]
|
||||
else if test "$tide_virtual_env_display" = 'venvName'
|
||||
else if test "$tide_virtual_env_display_mode" = 'venvName'
|
||||
printf '%s' {$tide_virtual_env_icon}' ' $splitVirtualEnv[-1]
|
||||
end
|
||||
end
|
||||
|
@ -21,7 +21,7 @@ function _tide_finish
|
||||
block --global # Event blocker prevents issues from arising while variables might be undefined etc.
|
||||
|
||||
if not contains 'prompt_char' $fake_tide_left_prompt_items # Without a prompt_char, the user won't know if a command failed/succeeded
|
||||
set fake_tide_status_always_display_icon true # Therefore, set the status to always display
|
||||
set fake_tide_status_always_display true # Therefore, set the status to always display
|
||||
end
|
||||
|
||||
cat "$_tide_dir/configure/fish_prompt.fish" >"$__fish_config_dir/functions/fish_prompt.fish"
|
||||
|
@ -72,7 +72,7 @@ _set fake___fish_git_prompt_color_dirtystate $tideColorGold
|
||||
_set fake___fish_git_prompt_color_untrackedfiles $_tide_color_light_blue
|
||||
_set fake___fish_git_prompt_color_stashstate $_tide_color_green
|
||||
# --------------Status--------------
|
||||
_set fake_tide_status_always_display_icon false
|
||||
_set fake_tide_status_always_display false
|
||||
_set fake_tide_status_success_icon '✔'
|
||||
_set fake_tide_status_success_color $tideColorDarkerGreen
|
||||
_set fake_tide_status_success_bg_color 444444
|
||||
@ -94,7 +94,7 @@ _set fake_tide_jobs_color $tideColorDarkerGreen
|
||||
_set fake_tide_jobs_bg_color 444444
|
||||
# ---------------Virtual_Env---------------
|
||||
_set fake_tide_virtual_env_color 00AFAF
|
||||
_set fake_tide_virtual_env_display 'projectName'
|
||||
_set fake_tide_virtual_env_display_mode 'projectName'
|
||||
_set fake_tide_virtual_env_icon ''
|
||||
_set fake_tide_virtual_env_bg_color 444444
|
||||
# ---------------Time---------------
|
||||
|
@ -72,7 +72,7 @@ _set fake___fish_git_prompt_color_dirtystate $tideColorGold
|
||||
_set fake___fish_git_prompt_color_untrackedfiles $_tide_color_light_blue
|
||||
_set fake___fish_git_prompt_color_stashstate $_tide_color_green
|
||||
# --------------Status--------------
|
||||
_set fake_tide_status_always_display_icon false
|
||||
_set fake_tide_status_always_display false
|
||||
_set fake_tide_status_success_icon '✔'
|
||||
_set fake_tide_status_success_color $tideColorDarkerGreen
|
||||
_set fake_tide_status_success_bg_color normal
|
||||
@ -94,7 +94,7 @@ _set fake_tide_jobs_color $tideColorDarkerGreen
|
||||
_set fake_tide_jobs_bg_color normal
|
||||
# ---------------Virtual_Env---------------
|
||||
_set fake_tide_virtual_env_color 00AFAF
|
||||
_set fake_tide_virtual_env_display 'projectName'
|
||||
_set fake_tide_virtual_env_display_mode 'projectName'
|
||||
_set fake_tide_virtual_env_icon ''
|
||||
_set fake_tide_virtual_env_bg_color normal
|
||||
# ---------------Time---------------
|
||||
|
@ -71,7 +71,7 @@ _set fake___fish_git_prompt_color_upstream cyan
|
||||
_set fake___fish_git_prompt_color_stagedstate brblack
|
||||
_set fake___fish_git_prompt_color_stashstate cyan
|
||||
# --------------Status--------------
|
||||
_set fake_tide_status_always_display_icon false
|
||||
_set fake_tide_status_always_display false
|
||||
_set fake_tide_status_success_icon '✔'
|
||||
_set fake_tide_status_success_color $tideColorDarkerGreen
|
||||
_set fake_tide_status_success_bg_color normal
|
||||
@ -93,7 +93,7 @@ _set fake_tide_jobs_color $tideColorDarkerGreen
|
||||
_set fake_tide_jobs_bg_color normal
|
||||
# ---------------Virtual_Env---------------
|
||||
_set fake_tide_virtual_env_color 00AFAF
|
||||
_set fake_tide_virtual_env_display 'projectName'
|
||||
_set fake_tide_virtual_env_display_mode 'projectName'
|
||||
_set fake_tide_virtual_env_icon ''
|
||||
_set fake_tide_virtual_env_bg_color normal
|
||||
# ---------------Time---------------
|
||||
|
@ -72,7 +72,7 @@ _set fake___fish_git_prompt_color_dirtystate 000000
|
||||
_set fake___fish_git_prompt_color_untrackedfiles 000000
|
||||
_set fake___fish_git_prompt_color_stashstate 000000
|
||||
# --------------Status--------------
|
||||
_set fake_tide_status_always_display_icon false
|
||||
_set fake_tide_status_always_display false
|
||||
_set fake_tide_status_success_icon '✔'
|
||||
_set fake_tide_status_success_color 4E9A06
|
||||
_set fake_tide_status_success_bg_color 2E3436
|
||||
@ -94,7 +94,7 @@ _set fake_tide_jobs_color 4E9A06
|
||||
_set fake_tide_jobs_bg_color 444444
|
||||
# ---------------Virtual_Env---------------
|
||||
_set fake_tide_virtual_env_color 00AFAF
|
||||
_set fake_tide_virtual_env_display 'projectName'
|
||||
_set fake_tide_virtual_env_display_mode 'projectName'
|
||||
_set fake_tide_virtual_env_icon ''
|
||||
_set fake_tide_virtual_env_bg_color 444444
|
||||
# ---------------Time---------------
|
||||
|
@ -16,8 +16,8 @@ set -lx tide_status_failure_icon
|
||||
set -lx tide_status_success_icon '✔'
|
||||
set -lx tide_status_failure_icon '✘'
|
||||
|
||||
@mesg 'always_display_icon: false'
|
||||
set -lx tide_status_always_display_icon false
|
||||
@mesg 'always_display: false'
|
||||
set -lx tide_status_always_display false
|
||||
|
||||
@test 'true' (true; _status) -z
|
||||
@test 'false' (false; _status) -z
|
||||
@ -26,8 +26,8 @@ set -lx tide_status_always_display_icon false
|
||||
@test 'false|true' (false|true; _status) = '✔ 1|0'
|
||||
@test 'false|false' (false|false; _status) = '✘ 1|1'
|
||||
|
||||
@mesg 'always_display_icon: true'
|
||||
set -lx tide_status_always_display_icon true
|
||||
@mesg 'always_display: true'
|
||||
set -lx tide_status_always_display true
|
||||
|
||||
@test 'true' (true; _status) = '✔'
|
||||
@test 'false' (false; _status) = '✘ 1'
|
||||
|
@ -16,14 +16,14 @@ source .venv/bin/activate.fish
|
||||
|
||||
set -lx tide_virtual_env_icon ''
|
||||
|
||||
set -lx tide_virtual_env_display projectName
|
||||
set -lx tide_virtual_env_display_mode projectName
|
||||
@test 'projectName' (_virtual_env) = " python_project"
|
||||
|
||||
set -lx tide_virtual_env_display venvName
|
||||
set -lx tide_virtual_env_display_mode venvName
|
||||
@test 'venvName' (_virtual_env) = " .venv"
|
||||
|
||||
set -lx tide_virtual_env_icon
|
||||
set -lx tide_virtual_env_display projectName
|
||||
set -lx tide_virtual_env_display_mode projectName
|
||||
@test 'No icon' (_virtual_env) = "python_project"
|
||||
|
||||
rm -r $dir
|
Loading…
Reference in New Issue
Block a user