summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2023-08-23 18:28:27 -0400
committerAndrew Cady <d@jerkface.net>2023-08-23 18:28:27 -0400
commit1515224417d8111f4f9974e1b527ae25bd144ea9 (patch)
tree116e83eb3afc4618878ce515063268b0c5fac92c
parent88a9b8f49123a0679267231d5738e34d93cf86c4 (diff)
argument passing fixed
-rw-r--r--rpc.bash5
1 files changed, 3 insertions, 2 deletions
diff --git a/rpc.bash b/rpc.bash
index ffadd12..07e1d87 100644
--- a/rpc.bash
+++ b/rpc.bash
@@ -38,7 +38,7 @@ all_commands()
38gudge() 38gudge()
39{ 39{
40 echo "Hello, <$REPLY>." 40 echo "Hello, <$REPLY>."
41 echo "Don't argue with me about <$*>." 41 echo "Don't argue with me about <${*@Q}>."
42} 42}
43 43
44fudge() 44fudge()
@@ -53,11 +53,12 @@ fudge()
53read_remote_command() 53read_remote_command()
54{ 54{
55 len=$1 55 len=$1
56 shift
56 [ "$len" -gt 0 ] 57 [ "$len" -gt 0 ]
57 REPLY= 58 REPLY=
58 read -r -N"$len" 59 read -r -N"$len"
59 [ "$REPLY" ] 60 [ "$REPLY" ]
60 remote_command=(bash -c ${REPLY@Q} "$@") 61 remote_command=(bash -c ${REPLY@Q} bash "${@@Q}")
61} 62}
62 63
63remote_run_shell_script_stdin() 64remote_run_shell_script_stdin()