diff --git a/functions b/functions index d0ec8ad..d6383e6 100644 --- a/functions +++ b/functions @@ -2,7 +2,7 @@ # pyr0ball script functions library # Initial Vars -functionsrev=1.1.0 +functionsrev=1.1.1 scriptname="${0##*/}" rundir="${0%/*}" rundir_absolute=$(cd `dirname $0` && pwd) @@ -15,8 +15,8 @@ ESC=$( printf '\033') # Detect OS type case $OSTYPE in - linux-gnu ) ESC=$( printf '\033') ;; - darwin ) ESC=$( printf '\e') ;; + linux-gnu* ) ESC=$( printf '\033') ;; + darwin* ) ESC=$( printf '\e') ;; cygwin ) ESC=$( printf '\033') ;; msys ) ESC=$( printf '\033') ;; esac @@ -74,7 +74,7 @@ fi # Extra Unicode Character Manipulation case $OSTYPE in - linux-gnu ) + linux-gnu* ) return_arrow=$(echo -e "\u2BAC") enter_arrow=$(echo -e "\u21B5") green_check=${grn}$(echo -e "\u2714")${dfl} @@ -82,7 +82,7 @@ case $OSTYPE in selected_opt=$(echo -e "\u25C9") deselected_opt=$(echo -e "\u25CE") ;; - darwin ) + darwin* ) return_arrow=$(echo -e "⮬") enter_arrow=$(echo -e "↵") green_check=${grn}$(echo -e "✔")${dfl} @@ -118,7 +118,7 @@ fi # Box Drawing characters case $OSTYPE in - linux-gnu ) + linux-gnu* ) light_h=$(echo -e "\u2500") norm_h=$(echo -e "\u2501") double_h=$(echo -e "\u2550") @@ -126,7 +126,7 @@ case $OSTYPE in norm_v=$(echo -e "\u2503") double_v=$(echo -e "\u2551") ;; - darwin ) + darwin* ) light_h=$(echo -e "─") norm_h=$(echo -e "━") double_h=$(echo -e "═") @@ -158,7 +158,7 @@ esac box-norm(){ # ---------------------------------------# case $OSTYPE in - linux-gnu ) + linux-gnu* ) top_border=${norm_h} bottom_border=${norm_h} left_border=${norm_v} @@ -169,7 +169,7 @@ box-norm(){ right_bottom_border=$(echo -e "\u251b") box_break_line=$(echo -e "\u25AB") ;; - darwin ) + darwin* ) top_border=${norm_h} bottom_border=${norm_h} left_border=${norm_v} @@ -211,7 +211,7 @@ box-norm(){ box-double(){ # ---------------------------------------# case $OSTYPE in - linux-gnu ) + linux-gnu* ) top_border=${double_h} bottom_border=${double_h} left_border=${double_v} @@ -222,7 +222,7 @@ box-double(){ right_bottom_border=$(echo -e "\u255D") box_break_line=$(echo -e "\u25AB") ;; - darwin ) + darwin* ) top_border=${double_h} bottom_border=${double_h} left_border=${double_v} @@ -263,7 +263,7 @@ box-double(){ box-heavy(){ # ---------------------------------------# case $OSTYPE in - linux-gnu ) + linux-gnu* ) top_border=$(echo -e "\u2580") bottom_border=$(echo -e "\u2584") left_border=$(echo -e "\u258C") @@ -274,7 +274,7 @@ box-heavy(){ right_bottom_border=$(echo -e "\u259F") box_break_line=$(echo -e "\u25AC") ;; - darwin ) + darwin* ) top_border=$(echo -e "▀") bottom_border=$(echo -e "▄") left_border=$(echo -e "▌") @@ -316,7 +316,7 @@ box-light(){ # ---------------------------------------# #top_border=$(echo -e '\u23BA') case $OSTYPE in - linux-gnu ) + linux-gnu* ) top_border=${light_h} bottom_border=${light_h} left_border=${light_v} @@ -327,7 +327,7 @@ box-light(){ right_bottom_border=$(echo -e "\u23CC") box_break_line=$(echo -e "\u23AF") ;; - darwin ) + darwin* ) top_border=${light_h} bottom_border=${light_h} left_border=${light_v} @@ -367,7 +367,7 @@ box-light(){ box-rounded(){ # ---------------------------------------# case $OSTYPE in - linux-gnu ) + linux-gnu* ) top_border=${light_h} bottom_border=${light_h} left_border=${light_v} @@ -378,7 +378,7 @@ box-rounded(){ right_bottom_border=$(echo -e "\u256F") box_break_line=$(echo -e "\u25A2") ;; - darwin ) + darwin* ) top_border=${light_h} bottom_border=${light_h} left_border=${light_v} @@ -798,4 +798,4 @@ multiselect(){ # ((idx++)) #done -set-boxtype \ No newline at end of file +set-boxtype