mirror of
https://github.com/IlanCosman/tide.git
synced 2024-10-26 18:51:05 +03:00
print config
This commit is contained in:
parent
bb00e03820
commit
a3426e157f
@ -23,7 +23,7 @@ function _tide_sub_configure
|
||||
end
|
||||
|
||||
if set -q _flag_auto
|
||||
set -fx _flag_finish Yes
|
||||
set -fx _flag_finish 'Overwrite your current tide config'
|
||||
else if test $COLUMNS -lt 55 -o $LINES -lt 21
|
||||
echo 'Terminal size too small; must be at least 55 x 21'
|
||||
return 1
|
||||
@ -99,6 +99,8 @@ function _tide_menu -a func
|
||||
break
|
||||
case $_tide_symbol_list
|
||||
set -g _tide_selected_option $_tide_option_list[(contains -i $input $_tide_symbol_list)]
|
||||
test "$func" != finish &&
|
||||
set -a _tide_configure_current_options --$func=(string escape $_tide_selected_option)
|
||||
set -e _tide_symbol_list
|
||||
set -e _tide_option_list
|
||||
break
|
||||
|
@ -1,16 +1,25 @@
|
||||
function finish
|
||||
set_color red
|
||||
_tide_title 'Overwrite tide config?'
|
||||
set_color normal
|
||||
_tide_title Finish
|
||||
|
||||
_tide_option y Yes
|
||||
echo
|
||||
set_color red
|
||||
_tide_option y 'Overwrite your current tide config'
|
||||
set_color normal
|
||||
echo
|
||||
|
||||
_tide_option p 'Exit and print the config you just generated'
|
||||
echo
|
||||
|
||||
_tide_menu (status function)
|
||||
switch $_tide_selected_option
|
||||
case Yes
|
||||
case 'Overwrite your current tide config'
|
||||
_tide_finish
|
||||
command -q clear && clear
|
||||
_tide_print_configure_current_options
|
||||
case 'Exit and print the config you just generated'
|
||||
set -e _tide_selected_option # Skip through all the _next_choices
|
||||
command -q clear && clear
|
||||
_tide_print_configure_current_options
|
||||
end
|
||||
end
|
||||
|
||||
@ -31,3 +40,11 @@ function _tide_finish
|
||||
# Re-initialize the prompt
|
||||
source (functions --details fish_prompt)
|
||||
end
|
||||
|
||||
function _tide_print_configure_current_options
|
||||
if command -q fish_indent
|
||||
printf %s\n "tide configure --auto $_tide_configure_current_options" | fish_indent --ansi
|
||||
else
|
||||
printf %s\n "tide configure --auto $_tide_configure_current_options"
|
||||
end
|
||||
end
|
||||
|
@ -1,4 +1,6 @@
|
||||
function style
|
||||
set -g _tide_configure_current_options
|
||||
|
||||
_tide_title 'Prompt Style'
|
||||
|
||||
_tide_option 1 Lean
|
||||
|
Loading…
Reference in New Issue
Block a user