From 070d59148376e71b16faea480108d3ecbdec8191 Mon Sep 17 00:00:00 2001 From: Benoit Pierre Date: Mon, 26 Aug 2024 01:17:04 +0200 Subject: [PATCH] kodev: improve `kodev prompt` Automatically use rlwrap if available. --- kodev | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kodev b/kodev index ad3201a2e..8eead494a 100755 --- a/kodev +++ b/kodev @@ -402,7 +402,11 @@ $(build_options_help_msg '' 'use existing build' 'default' '') " parse_options "${BUILD_GETOPT_SHORT}" "${BUILD_GETOPT_LONG}" '0' "$@" setup_target 'emulator' - run_make ${NO_BUILD:+--assume-old=all} run-prompt + local margs=() + if command -v rlwrap >/dev/null; then + margs+=(RWRAP='rlwrap') + fi + run_make ${NO_BUILD:+--assume-old=all} "${margs[@]}" run-prompt } function kodev-run() {