Browse Source

more ui stuff

pull/3288/head
Daniel Gibbs 5 years ago
parent
commit
17d1122cce
  1. 6
      lgsm/functions/command_send.sh
  2. 9
      lgsm/functions/core_messages.sh

6
lgsm/functions/command_send.sh

@ -5,12 +5,15 @@
# Website: https://linuxgsm.com
# Description: Send command to the server tmux console.
commandname="SEND"
commandaction="Send"
functionselfname="$(basename "$(readlink -f "${BASH_SOURCE[0]}")")"
fn_firstcommand_set
check.sh
if [ -z "${userinput2}" ]; then
fn_print_header
fn_print_information_nl "Send a command to to the console."
fn_print_information_nl "Send a command to the console."
fi
check_status.sh
@ -21,6 +24,7 @@ if [ "${status}" != "0" ]; then
echo ""
commandtosend=$( fn_prompt_message "send: " )
fi
echo ""
fn_print_dots "Sending command to console: \"${commandtosend}\""
tmux send-keys -t "${servicename}" "${commandtosend}" ENTER
fn_print_ok_nl "Sending command to console: \"${commandtosend}\""

9
lgsm/functions/core_messages.sh

@ -361,13 +361,12 @@ fn_prompt_yn(){
# Prompt for message
fn_prompt_message(){
local prompt="$1"
while true; do
unset prompt
local prompt="$1"
read -e -p "${prompt}" -r answer
echo -e "${answer}"
if ! fn_prompt_yn "Continue?" Y; then
exitcode=0
core_exit.sh
if fn_prompt_yn "Continue" Y; then
break;
fi
done
echo "${answer}"

Loading…
Cancel
Save