glitchninja2000 / mobileterminal

Automatically exported from code.google.com/p/mobileterminal
0 stars 0 forks source link

Cut and Paste or `pbpaste` #250

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Copy anything to the clipboard (aka pasteboard)
2. Go into terminal and try to paste by holding your finger at the prompt.

1. Try to highlight anything on MobileTerminal and then look for the "Cut, 
Copy,..." popup menu.

What is the expected output? What do you see instead?
You would like to be able to paste text from the clipboard into the command 
line.  Instead, no paste available.  
You would like to highlight text in command input or output and place it in the 
clipboard.  

What version of the product are you using? On what operating system?
r510, iOS 4.2.1, 3Gs early bootrom.  PwnageTool.app 4.1.3; redsn0w.app 0.9.6b6

Please provide any additional information below.
Wouldn't be as much an issue if command substitution worked.  For example, you 
could copy a URL you wanted to download and then in terminal type:  wget 
`pbpaste` 
But I don't think command substitution has been implemented yet, and where 
would you find the GRAVE ACCENT on the keyboard anyway.  
You can re-direct things into the pbcopy command and use it elsewhere on the 
phone.  But it would be great if you could highlight and copy.  

Original issue reported on code.google.com by fredleason@gmail.com on 25 Jan 2011 at 3:22

GoogleCodeExporter commented 8 years ago
You're right, 510 has indeed a problem with pasting
But, and thanks for letting me know about pbpaste, really just type pbpaste or, 
if you have an url in your clipboard, try "wget $( pbpaste )"

The grave accent as it's obviously called (I'm no native speaker as you might 
have guessed. I don't even know what it's called in german) is found right next 
to the exclamation mark. Hold your finger and it will extend to similar looking 
symbols. On the right there's also the grave accutr
However, it's much more easy to read to use $(), just keep in mind you need 
spaces between the commands (and eventual other stuff) and the ()'s, just like 
in my example above.

I tried pasting a local, a network and an internet URL, wget worked fine for me.
If you are tired of typing the same stuff over and over, write wget $( pbpaste 
) into a plain file called pbget, chmod it to 0755 or 0777 and move it as root 
to /bin

Original comment by dave.sto...@gmail.com on 25 Jan 2011 at 4:42

GoogleCodeExporter commented 8 years ago
Oh, of course this one's accepted

Original comment by dave.sto...@gmail.com on 25 Jan 2011 at 4:44

GoogleCodeExporter commented 8 years ago
Were you aware that copy and paste is disabled by default now and enabled with 
a gesture? Essentially, its hard to make the left/right gestures and the copy 
paste gestures all work at the same time.  Maybe someone has a creative idea 
about how to do this in some way that is easy to understand.

(You could imagine partitioning the screen, but it was already non-obvious that 
you scroll on the right and enter gestures on the center)

Original comment by allen.po...@gmail.com on 25 Jan 2011 at 5:53

GoogleCodeExporter commented 8 years ago
The grstures worked much better in the older revisions
Any way to restore their usability again?

Original comment by dave.sto...@gmail.com on 25 Jan 2011 at 6:00

GoogleCodeExporter commented 8 years ago
> use $(), just keep in mind you need spaces between the commands (and eventual 
other stuff) and the ()'s
You don't.

Original comment by chortos@inbox.lv on 25 Jan 2011 at 3:15

GoogleCodeExporter commented 8 years ago
What? Of course I did.
$(pbpaste) wouldn't work, $( pbpaste ) would

Original comment by dave.sto...@gmail.com on 25 Jan 2011 at 4:58

GoogleCodeExporter commented 8 years ago
It looks like command substitution works all three ways:  `command` $( command 
) and $(command). 

However, it is not working with wget. Wget does not recognize the output of 
pbpaste as a URL. I can't tell if the problem is the shell or wget. Advice 
would be appreciated, but this is admittedly off topic. 

I did try turning copy/paste on with a gesture. When I did, the cursor block 
brightened, but I was not able to paste. Should I see pop-up buttons?  Do I 
need to type •v ?  How is it supposed to work?

Original comment by fredleason@gmail.com on 25 Jan 2011 at 7:08

GoogleCodeExporter commented 8 years ago
Could you please show what was in your clipboard or even better, what was in 
your clipboard and the output of wget.
I strongly suspect that this is no Terminal-Bug, because of the given 
circumstances. Please read ReportingAnIssue for informations

Marking as Invalid untill proven as bug

Original comment by dave.sto...@gmail.com on 25 Jan 2011 at 7:17

GoogleCodeExporter commented 8 years ago
Workaround found

pbpaste 2>&1

Original comment by dave.sto...@gmail.com on 26 Jan 2011 at 1:37