Commit c53f5c19 authored by Matteo Melli's avatar Matteo Melli

Added dict to rlwrap and failback to read

parent e51141c1
Pipeline #88513 passed with stage
in 22 seconds
next
quit
\ No newline at end of file
......@@ -49,11 +49,16 @@ function do_menu(){
echo
if has_step "$next_step"
then
export read_prompt="Enter the step number to execute, next to execute step $next_step or quit to exit? "
read_prompt="Enter the step number to execute, next to execute step $next_step or quit to exit? "
else
export read_prompt="Enter the step number to execute or quit to exit? "
read_prompt="Enter the step number to execute or quit to exit? "
fi
if which rlwrap > /dev/null 2>&1
then
command="$(rlwrap -f migration.dict -C migration bash -c 'read -p "'"$read_prompt"'" command; echo "$command"')"
else
read -p "$read_prompt" command
fi
command="$(rlwrap -C migration bash -c 'read -p "$read_prompt" command; echo "$command"')"
step=
case "$command" in
quit)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment