Add support for EOF

This commit is contained in:
Nicholas Chambers 2020-05-02 17:32:34 -05:00
parent 4db7643704
commit d22a8842b8
2 changed files with 12 additions and 1 deletions

View File

@ -5,3 +5,8 @@ build_prompt() {
printf '%s:%d> ' "$host" "$port"
fi
}
cleanup() {
exec {sock}<&-
printf '\n'
}

View File

@ -18,11 +18,17 @@ if (( $# )); then
fi
###
# library
# load library
###
. "${REDISH_LIB_PATH:-.}"/redi.sh
###
# cleanup on exit
###
trap cleanup EXIT
###
# driver
###