From 21eea8d436ae4dbb659e2e7ce676b087410f6946 Mon Sep 17 00:00:00 2001 From: Luigi Donadel Date: Wed, 6 Nov 2024 18:59:49 +0100 Subject: [PATCH] fix: add support for spaced text on android input --- lib/commands.ts | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/commands.ts b/lib/commands.ts index d92023d..ff6b393 100644 --- a/lib/commands.ts +++ b/lib/commands.ts @@ -27,7 +27,7 @@ const commands: { }), input: (text: string): CommandMap => ({ ios: `idb focus && cliclick t:"${text}"`, - android: `adb shell input text "${text}"` + android: `adb shell input text $(echo "${text}" | sed 's/ /\%s/g')` }), getOpenSimulatorId: (): CommandMap => ({ ios: "idb list-targets | awk -F '[|()]' '/Booted/ {print $2}' | head -n 1", diff --git a/package.json b/package.json index b6030bf..6fb9fec 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "udblib", - "version": "0.1.5", + "version": "0.1.6", "description": "Universal Debug Bridge: Control your iOS Simulators and Android Emulators via cli", "scripts": { "build": "tsc",