Skip to content

Commit

Permalink
refactor: replace all use of fold with fmt; no need for ncurses
Browse files Browse the repository at this point in the history
  • Loading branch information
flexiondotorg committed Jul 2, 2024
1 parent f13d801 commit 441a2d0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions quickget
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ function os_homepage() {
function error_specify_os() {
echo "ERROR! You must specify an operating system."
echo "- Supported Operating Systems:"
os_support | fold -s -w "$(tput cols)"
os_support | fmt -w 80
echo -e "\nTo see all possible arguments, use:\n quickget -h or quickget --help"
exit 1
}

function os_supported() {
if [[ ! "$(os_support)" =~ ${OS} ]]; then
echo -e "ERROR! ${OS} is not a supported OS.\n"
os_support | fold -s -w "$(tput cols)"
os_support | fmt -w 80
exit 1
fi
}
Expand All @@ -171,10 +171,10 @@ function error_specify_release() {
;;
*)
echo -en " - Releases:\t"
"releases_${OS}" | fold -s -w "$(tput cols)"
"releases_${OS}" | fmt -w 80
if [[ $(type -t "editions_${OS}") == function ]]; then
echo -en " - Editions:\t"
"editions_${OS}" | fold -s -w "$(tput cols)"
"editions_${OS}" | fmt -w 80
fi
;;
esac
Expand Down Expand Up @@ -3364,7 +3364,7 @@ Arguments:
--------------------------------------------------------------------------------
Supported Operating Systems:\n\n' "$(quickemu --version)" "${CURL_VERSION}"
os_support | fold -s -w "$(tput cols)"
os_support | fmt -w 80
}

trap cleanup EXIT
Expand Down

0 comments on commit 441a2d0

Please sign in to comment.