Let's say I have this long one-liner command:

am force-stop com.example.foo; am force-stop com.example.bar; am force-stop com.example.foo2 am force-stop com.example.bar2; am force-stop com.example.foo; am force-stop com.example.bar; ps|grep example

When I copy-paste into terminal, it doesn't wrap as multiple lines like ordinary terminal do, instead it keep single line:

enter image description here

As you can see, I can't view whole commands in single screen when the cursor move to the end by copy-paste OR press End. It only shows partial commands and not able to re-copy part of command easily.

Desired behavior: enter image description here

Is it possible ? I learned that COLUMNS=150 can increase the adb command width from 80 to 150, but still I can't found a way to achieve this.

Note that I don't want to add \ manually which also not working when reuse the command: enter image description here


My workaround is use busybox sh, but still I welcome any answer to achieve this in native way without busybox.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.