diff options
| author | Jeremy Brubaker <jbru362@gmail.com> | 2022-06-10 10:52:48 -0400 |
|---|---|---|
| committer | Jeremy Brubaker <jbru362@gmail.com> | 2022-06-10 10:52:48 -0400 |
| commit | e4f7684a4211853b1c879c9847759960fe1adf1e (patch) | |
| tree | fa356a79e96ca626617d485ce204fecc7828e85b | |
| parent | 30d8ac5669bf188dcd602f0dc93c6ba412f5662f (diff) | |
| download | anypinentry-e4f7684a4211853b1c879c9847759960fe1adf1e.tar.gz anypinentry-e4f7684a4211853b1c879c9847759960fe1adf1e.zip | |
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
| -rwxr-xr-x | anypinentry | 3 |
1 files changed, 2 insertions, 1 deletions
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) ;; |
