#!/bin/sh

# . "${DOTFILES}/scripts/core/main.sh"
import "" # todo

##? Brief script explanation
##?
##? Usage
##?    script args

main() {
  IFS=" "
  printf '%s' "$*"
}

safe_exit() { # move to core?
  IFS=" "
  printf '%s' "$*"
  trap - INT TERM EXIT
  exit "${1:-0}"
}

trap_exit() { # move to core?
  safe_exit
  die "Exit trapped. In function: '${FUNCNAME[*]}'"
}

# IFS=$' \n\t'
IFS="$(printf -- ' \n\t|')"
IFS="${IFS%'|'}"

trap trap_exit EXIT INT TERM
docparse "$@"
main "$@"
safe_exit "$@"
