From fd2f443560a1ae18ce23378a9a0f2c28d4115ffe Mon Sep 17 00:00:00 2001 From: Patrick Date: Sat, 10 Oct 2020 22:30:43 -0700 Subject: [PATCH 1/4] fix broken link to fish git prompt docs --- docs/Configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Configuration.md b/docs/Configuration.md index 358e13c..22b8b89 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -212,5 +212,5 @@ Most of Tide's git capabilities are inherited from fish's built-in [fish_git_pro | icon | icon to display in front of virtual_env item | string | [`set_color`]: https://fishshell.com/docs/current/cmds/set_color.html -[fish_git_prompt]: https://fishshell.com/docs/current/cmds/fish_git_prompt.htmls +[fish_git_prompt]: https://fishshell.com/docs/current/cmds/fish_git_prompt.html [nvm.fish]: https://github.com/jorgebucaran/nvm.fish From b0982441aa57e034b7a37ee848cd7b9ebc8affad Mon Sep 17 00:00:00 2001 From: Ilan Cosman Date: Tue, 13 Oct 2020 07:41:54 -0700 Subject: [PATCH 2/4] Add set_color normal to right_prompt (fixes #33) --- tide_theme/configure/fish_prompt.fish | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tide_theme/configure/fish_prompt.fish b/tide_theme/configure/fish_prompt.fish index 6de7c92..0950c3a 100644 --- a/tide_theme/configure/fish_prompt.fish +++ b/tide_theme/configure/fish_prompt.fish @@ -16,4 +16,7 @@ end function fish_right_prompt printf '%s' $_tide_fish_right_prompt_display + # Right prompt is always the last thing on the line + # therefore reset colors for tab completion + set_color normal end \ No newline at end of file From f6cf2770e1ebacfd155052c505e87750bfd62770 Mon Sep 17 00:00:00 2001 From: Michael Bryant Date: Fri, 23 Oct 2020 15:07:41 -0700 Subject: [PATCH 3/4] Prevent error messages while detecting OS (#40) * add test for file existence to avoid errors --- functions/_tide_detect_os.fish | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functions/_tide_detect_os.fish b/functions/_tide_detect_os.fish index 3c100ea..3eab9c8 100644 --- a/functions/_tide_detect_os.fish +++ b/functions/_tide_detect_os.fish @@ -17,6 +17,10 @@ function _tide_detect_os end function _tide_detect_os_linux_cases -a file key + if not test -f $file + return 1 + end + set -l splitOsRelease (cat $file | string split '=') set -l value $splitOsRelease[(math (contains --index $key $splitOsRelease)+1)] set -l name (string trim --chars='"' $value | string lower) From 8f796136b5e02d5ddb756ad107e4c6622d2079f5 Mon Sep 17 00:00:00 2001 From: Michael Bryant Date: Fri, 23 Oct 2020 17:10:31 -0700 Subject: [PATCH 4/4] use mktemp instead of explicitly named files (#41) * add mktemp instead of explicitly named files * use mktemp -u flag to fix bugs Co-authored-by: Ilan Cosman --- functions/_tide_sub_test.fish | 6 +++--- tools/_tide_actual_install.fish | 9 +++------ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/functions/_tide_sub_test.fish b/functions/_tide_sub_test.fish index f5461eb..970fb68 100644 --- a/functions/_tide_sub_test.fish +++ b/functions/_tide_sub_test.fish @@ -22,9 +22,9 @@ function _tide_sub_test set -l testsDir "$_tide_dir/tests" - set -l pending '/tmp/tide_test' - set -l failed '/tmp/tide_test_failed' - set -l passed '/tmp/tide_test_passed' + set -l pending (mktemp -u) + set -l failed (mktemp -u) + set -l passed (mktemp -u) set -l returnStatement 0 diff --git a/tools/_tide_actual_install.fish b/tools/_tide_actual_install.fish index 943494b..9bc3ca9 100644 --- a/tools/_tide_actual_install.fish +++ b/tools/_tide_actual_install.fish @@ -11,14 +11,11 @@ function _tide_actual_install printf '%s\n' 'Installing tide theme...' # -----------------Download Files----------------- - set -lx tempDir '/tmp/tide_theme' - if test -e $tempDir - rm -rf $tempDir - end + set -lx tempDir (mktemp -u) # Copy/clone repository into $tempDir if set -q _flag_local - cp -rf "$location" "$tempDir" + cp -r $location $tempDir else git clone --quiet --depth 1 --branch $location https://github.com/IlanCosman/tide.git $tempDir end @@ -99,4 +96,4 @@ function _user_confirm_defaultYes -a question return 0 end end -end \ No newline at end of file +end