diff --git a/spcd/main.sh b/spcd/main.sh index 0ec836b..418a11d 100644 --- a/spcd/main.sh +++ b/spcd/main.sh @@ -298,6 +298,18 @@ spcd_os_rm() { fi } +spcd_os_write() { + spcd_os_write__file="${1}" + spcd_os_write__text="${2}" + if [ -n "${spcd_os_write__file}" ]; then + [ -f "${spcd_os_write__file}" ] && + spcd_os_cat "${spcd_os_write__file}" + echo "→ ${spcd_os_write__file}" + printf "%s" "${spcd_os_write__text}" >"${spcd_os_write__file}" + spcd_os_cat "${spcd_os_write__file}" + fi +} + # ╭───────────┬────────╮ # │ functions │ python │ # ╰───────────┴────────╯ @@ -1230,18 +1242,6 @@ spcd_sed() { fi } -spcd_os_write() { - spcd_os_write__file="${1}" - spcd_os_write__text="${2}" - if [ -n "${spcd_os_write__file}" ]; then - [ -f "${spcd_os_write__file}" ] && - spcd_os_cat "${spcd_os_write__file}" - echo "→ ${spcd_os_write__file}" - printf "%s" "${spcd_os_write__text}" >"${spcd_os_write__file}" - spcd_os_cat "${spcd_os_write__file}" - fi -} - #╶──────────────────────────────────────╴ # ╭──────╮