~kmaasrud/shatgpt

21e99fc0f84c2d8d5f015deec4cd35fe0182aec4 — Knut Magnus Aasrud 1 year, 6 months ago f7f6e04
fix space in input and format output better
1 files changed, 3 insertions(+), 3 deletions(-)

M wsh
M wsh => wsh +3 -3
@@ 77,7 77,7 @@ main() {
        ;;
    esac

    url=$(make_url "$@")
    url=$(make_url "$*")
    data=$(fetch_data $url)
    title=$(grep_field "$data" title)
    summary=$(grep_field "$data" extract)


@@ 89,8 89,8 @@ main() {

    printf '\n'
    printf '%s\n' "$title" | bolden
    printf '%s\n' "$summary" | trim | fold -sw 80
    printf '%b\n' "$summary" | trim | fold -sw 80
    printf '\n'
}

main "$@"
main "$*"