From e4f7684a4211853b1c879c9847759960fe1adf1e Mon Sep 17 00:00:00 2001 From: Jeremy Brubaker Date: Fri, 10 Jun 2022 10:52:48 -0400 Subject: Fix case-changing of command argument Only change the case of a command argument when it needs to be matched (currently only in get_info). The previous method prevented things like setting a multi-case description with SETDESC --- anypinentry | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/anypinentry b/anypinentry index 82ab571..cd810a9 100755 --- a/anypinentry +++ b/anypinentry @@ -64,6 +64,7 @@ save_option() { } get_info() { + arg=$(echo "$1" | tr a-z A-Z) case "$1" in VERSION) echo "D $VERSION" && echo "OK" ;; PID) echo "D $$" && echo "OK" ;; @@ -149,7 +150,7 @@ interpret_command() { return fi cmd="$(echo "$1" | cut -d' ' -f1 | tr a-z A-Z)"; - data="$(echo "$1" | cut -d' ' -f2- | tr a-z A-Z)"; + data="$(echo "$1" | cut -d' ' -f2-)"; case "${cmd}" in NOP) ;; -- cgit v1.3.1