Commit 9b29d3f6 authored by xynxynxyn's avatar xynxynxyn

replace if statement with parameter expansion

parent 43c43985
...@@ -3876,18 +3876,8 @@ prin() { ...@@ -3876,18 +3876,8 @@ prin() {
length="${#length}" length="${#length}"
fi fi
# Make sure $sep is unset
unset -v sep
# Check if $seperator is set
if [[ $seperator ]]; then
sep=$seperator
else
sep=":"
fi
# Format the output. # Format the output.
string="${string/:/${reset}${colon_color}${sep}${info_color}}" string="${string/:/${reset}${colon_color}${separator:=:}${info_color}}"
string="${subtitle_color}${bold}${string}" string="${subtitle_color}${bold}${string}"
# Print the info. # Print the info.
...@@ -4508,7 +4498,7 @@ get_args() { ...@@ -4508,7 +4498,7 @@ get_args() {
"--underline") underline_enabled="$2" ;; "--underline") underline_enabled="$2" ;;
"--underline_char") underline_char="$2" ;; "--underline_char") underline_char="$2" ;;
"--bold") bold="$2" ;; "--bold") bold="$2" ;;
"--seperator") seperator="$2" ;; "--separator") separator="$2" ;;
# Color Blocks # Color Blocks
"--color_blocks") color_blocks="$2" ;; "--color_blocks") color_blocks="$2" ;;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment