mirror of
https://github.com/IlanCosman/tide.git
synced 2024-12-23 12:03:48 +03:00
Imrpove local_install
This commit is contained in:
parent
913409b4dc
commit
8d37ae4522
9
conf.d/lean_count_left_prompt_height.fish
Normal file
9
conf.d/lean_count_left_prompt_height.fish
Normal file
@ -0,0 +1,9 @@
|
||||
function lean_count_left_prompt_height --on-variable lean_left_prompt_items
|
||||
set -U lean_left_prompt_height 1
|
||||
|
||||
for item in $lean_left_prompt_items
|
||||
if test $item = 'newline'
|
||||
set -U lean_left_prompt_height (math $lean_left_prompt_height+1)
|
||||
end
|
||||
end
|
||||
end
|
@ -1,13 +1,16 @@
|
||||
function local_install -a localRepo
|
||||
source "$localRepo/install.fish"; and _set_lean_defaults
|
||||
if source "$localRepo/install.fish"
|
||||
cp -r "$localRepo/conf.d" $__fish_config_dir
|
||||
cp -r "$localRepo/functions" $__fish_config_dir
|
||||
cp -r "$localRepo/lean_theme" $__fish_config_dir
|
||||
cp -r "$localRepo/tests" $__fish_config_dir
|
||||
cp -r "$localRepo/dev/." "$__fish_config_dir/functions"
|
||||
|
||||
cp -r "$localRepo/conf.d" $__fish_config_dir
|
||||
cp -r "$localRepo/functions" $__fish_config_dir
|
||||
cp -r "$localRepo/lean_theme" $__fish_config_dir
|
||||
cp -r "$localRepo/tests" $__fish_config_dir
|
||||
cp -r "$localRepo/dev/." "$__fish_config_dir/functions"
|
||||
_set_lean_defaults
|
||||
_source_lean_functions
|
||||
|
||||
# Install fisher and fishtape for testing
|
||||
curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish
|
||||
fisher add jorgebucaran/fishtape
|
||||
# Install fisher and fishtape for testing
|
||||
curl https://git.io/fisher --create-dirs -sLo ~/.config/fish/functions/fisher.fish
|
||||
fisher add jorgebucaran/fishtape
|
||||
end
|
||||
end
|
@ -1,15 +1,10 @@
|
||||
function lean_left_prompt
|
||||
set -U lean_left_prompt_height 1
|
||||
|
||||
for item in lean_{$lean_left_prompt_items}
|
||||
set -l itemOutput (_$item)
|
||||
|
||||
if test -n "$itemOutput"
|
||||
printf $itemOutput
|
||||
end
|
||||
if test $item = 'lean_newline'
|
||||
set -U lean_left_prompt_height (math $lean_left_prompt_height+1)
|
||||
end
|
||||
|
||||
set_color normal
|
||||
end
|
||||
|
11
install.fish
11
install.fish
@ -27,8 +27,7 @@ function lean_install
|
||||
_set_lean_defaults
|
||||
|
||||
# -----------------------Finish-----------------------
|
||||
source "$__fish_config_dir/conf.d/lean_cursor_movement.fish"
|
||||
source "$__fish_config_dir/functions/fish_prompt.fish"
|
||||
_source_lean_functions
|
||||
|
||||
set_color $lean_color_green
|
||||
echo 'Lean theme installed!'
|
||||
@ -100,6 +99,14 @@ function _set_lean_defaults
|
||||
set -U lean_time_color 5F8787
|
||||
end
|
||||
|
||||
function _source_lean_functions
|
||||
source "$__fish_config_dir/conf.d/lean_count_left_prompt_height.fish"
|
||||
source "$__fish_config_dir/conf.d/lean_cursor_movement.fish"
|
||||
source "$__fish_config_dir/functions/fish_prompt.fish"
|
||||
|
||||
lean_count_left_prompt_height
|
||||
end
|
||||
|
||||
function _user_confirm_defaultYes -a question
|
||||
while true
|
||||
read -P "$question [Y/n] " input
|
||||
|
Loading…
Reference in New Issue
Block a user