holzschu / a-shell

A terminal for iOS, with multiple windows
BSD 3-Clause "New" or "Revised" License
2.62k stars 116 forks source link

How does one paste the clipboard to the shell command line? #408

Open anothersailor opened 2 years ago

anothersailor commented 2 years ago

I have looked everywhere for a command button, (Mac OS), but found none. There are a control and an escape buttons, but no Command that could apply to V ! Thanks, E.

ifuchs commented 2 years ago

I just do a long press and select paste.

On Wed, May 18, 2022 at 9:36 AM anothersailor @.***> wrote:

I have looked everywhere for a command button, (Mac OS), but found none. There are a control and an escape buttons, but no Command that could apply to V ! Thanks, E.

— Reply to this email directly, view it on GitHub https://github.com/holzschu/a-shell/issues/408, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLDPSHIUUQXKYJIFHYVMJ3VKTW7NANCNFSM5WIQIBHQ . You are receiving this because you are subscribed to this thread.Message ID: @.***>

anothersailor commented 2 years ago

That simple, indeed. Stupid of me. Many thanks, a-shell is awesome!

ifuchs commented 2 years ago

There is also the pbpaste (and pbcopy) command. On Wed, May 18, 2022 at 10:23 AM anothersailor @.***> wrote:

That simple, indeed. Stupid of me. Many thanks, a-shell is awesome!

— Reply to this email directly, view it on GitHub https://github.com/holzschu/a-shell/issues/408#issuecomment-1130083587, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABLDPSGPB6B2EZGZ5JACFWTVKT4MLANCNFSM5WIQIBHQ . You are receiving this because you commented.Message ID: @.***>

Emasoft commented 2 years ago

Long press seems tricky on my ipad pro. A couple of copy/paste buttons on the toolbar would be MUCH better.

holzschu commented 2 years ago

Other people have asked for it too. I'll be adding the cut-copy-paste buttons to the next TestFlight version to see whether it improves user experience. I'd say it's mostly useful for paste, but it seems weird to provide only the paste button.

Edit: after more tests, I kept only the paste button. Cut and Copy are present once you have selected some text.

holzschu commented 2 years ago

It's now out for TestFlight, if you want to test it: https://testflight.apple.com/join/REdHww5C

cipri-tom commented 6 days ago

@holzschu it's cool! Very useful, but it seems to do something known as "paste mode", adding extra symbols to pasted text.

'text to paste' becomes [200~text to paste[201~.

I'm not sure how to disable that. It seems to be a mode of the term, which can be disabled with some escape codes, but I cannot printf

holzschu commented 5 days ago

That's interesting; the pbpaste command, which also pastes, does not have the control characters. Looking at the code, the paste button and the pbpaste command are basically the same, except one is written in Swift and the other is written in Objective-C. This is very intriguing.

holzschu commented 5 days ago

I had the same issue as you on the day you sent it, but now I cannot reproduce it anymore. Whether I use the paste button or the pbpaste command, the control characters are stripped, at least on my devices.

cipri-tom commented 4 days ago

@holzschu it no longer happens on my side either ... What on earth ? 😄 ... Thanks for the magical solution !