From 86cd04aa3f5716b983cd28f0dca97c17875271e1 Mon Sep 17 00:00:00 2001 From: Ilan Cosman Date: Thu, 16 Apr 2020 02:15:34 -0700 Subject: [PATCH] Minor edits --- install.fish | 4 ++-- lean_theme/lean_git_prompt.fish | 6 +++--- lean_theme/lean_uninstall.fish | 20 ++++++++++---------- lean_theme/user_ask.fish | 4 ++-- 4 files changed, 17 insertions(+), 17 deletions(-) diff --git a/install.fish b/install.fish index b603b0c..497b5c4 100644 --- a/install.fish +++ b/install.fish @@ -1,13 +1,13 @@ echo "Installing lean theme..." # -----------------Download Functions----------------- -set tempDir "/tmp/lean_theme" +set -l tempDir "/tmp/lean_theme" # Clone repository into $tempDir if test -e $tempDir rm -rf $tempDir end -git clone -q https://github.com/IlanCosman/lean.git $tempDir +git clone -q --depth=1 https://github.com/IlanCosman/lean.git $tempDir # Remove unnecessary files rm "$tempDir/install.fish" diff --git a/lean_theme/lean_git_prompt.fish b/lean_theme/lean_git_prompt.fish index cb25fbe..e974d95 100644 --- a/lean_theme/lean_git_prompt.fish +++ b/lean_theme/lean_git_prompt.fish @@ -1,8 +1,8 @@ function lean_git_prompt - set gitPrompt (fish_git_prompt) + set -l gitPrompt (fish_git_prompt) - set gitPrompt (string replace "(" "" $gitPrompt) - set gitPrompt (string replace ")" "" $gitPrompt) + set -l gitPrompt (string replace "(" "" $gitPrompt) + set -l gitPrompt (string replace ")" "" $gitPrompt) echo $gitPrompt end \ No newline at end of file diff --git a/lean_theme/lean_uninstall.fish b/lean_theme/lean_uninstall.fish index 2be7ff4..e724342 100644 --- a/lean_theme/lean_uninstall.fish +++ b/lean_theme/lean_uninstall.fish @@ -8,20 +8,20 @@ function lean_uninstall # ---------------Erase Theme Variables--------------- # --------------Colors-------------- - set vars $vars lean_green lean_light_blue lean_dark_blue lean_gold + set -l vars $vars lean_green lean_light_blue lean_dark_blue lean_gold # ---------------Pwd--------------- - set vars $vars fish_prompt_pwd_dir_length lean_shorten_pwd_margin + set -l vars $vars fish_prompt_pwd_dir_length lean_shorten_pwd_margin # ------------Git prompt------------ - set vars $vars __fish_git_prompt_show_informative_status __fish_git_prompt_showstashstate + set -l vars $vars __fish_git_prompt_show_informative_status __fish_git_prompt_showstashstate # -------Symbols------- - set vars $vars __fish_git_prompt_char_stateseparator __fish_git_prompt_char_cleanstate - set vars $vars __fish_git_prompt_char_upstream_ahead __fish_git_prompt_char_upstream_behind - set vars $vars __fish_git_prompt_char_stagedstate __fish_git_prompt_char_dirtystate - set vars $vars __fish_git_prompt_char_untrackedfiles __fish_git_prompt_char_stashstate + set -l vars $vars __fish_git_prompt_char_stateseparator __fish_git_prompt_char_cleanstate + set -l vars $vars __fish_git_prompt_char_upstream_ahead __fish_git_prompt_char_upstream_behind + set -l vars $vars __fish_git_prompt_char_stagedstate __fish_git_prompt_char_dirtystate + set -l vars $vars __fish_git_prompt_char_untrackedfiles __fish_git_prompt_char_stashstate # --------Colors-------- - set vars $vars __fish_git_prompt_color_branch __fish_git_prompt_color_upstream - set vars $vars __fish_git_prompt_color_stagedstate __fish_git_prompt_color_dirtystate - set vars $vars __fish_git_prompt_color_untrackedfiles __fish_git_prompt_color_stashstate + set -l vars $vars __fish_git_prompt_color_branch __fish_git_prompt_color_upstream + set -l vars $vars __fish_git_prompt_color_stagedstate __fish_git_prompt_color_dirtystate + set -l vars $vars __fish_git_prompt_color_untrackedfiles __fish_git_prompt_color_stashstate for var in $vars set -e $var diff --git a/lean_theme/user_ask.fish b/lean_theme/user_ask.fish index 7805afa..e7708af 100644 --- a/lean_theme/user_ask.fish +++ b/lean_theme/user_ask.fish @@ -28,6 +28,6 @@ function user_ask --argument-names question options end end -function _indexMinusOne - echo (math (contains -i $argv[1] $argv[2..-1])-1) +function _indexMinusOne --argument-names item + echo (math (contains -i $item $argv[2..-1])-1) end \ No newline at end of file