blink icon indicating copy to clipboard operation
blink copied to clipboard

ssh piped output includes STDERR output

Open sukima opened this issue 4 years ago • 3 comments

Checklist

Configuration

Hardware iPad Air (4th generation)
iPadOS 15.1
Blink.sh 14.0.3

Describe the bug

I often transfer data between machines via pipes.

blink> ssh myserver "echo test" | pbcopy

This works flawlessly but unfortunately both STDOUT and STDERR are captured from the SSH command.

Expected

SSH connection info should be routed to STDERR and not included in the STDOUT when piping.

In the example above the clipboard should contain the text: test.

Actual

Both the SSH connection info and the output are routed to STDOUT.

In the example above the clipboard contains the text:

Connected to 192.168.1.1
test

sukima avatar Jan 12 '22 21:01 sukima

I think this might affect piping non-text data to pbcopy. For example if I were to…

blink> ssh myserver "cat foobar.jpg" | pbcopy

sukima avatar Jan 12 '22 21:01 sukima

I should also add I use this feature a lot as a way to move clipboard data between machine using a server as an intermediary. On the server I create a named pipe mkfifo ~/hopper.

Machine A

(machine-a)$ pbpaste | ssh myserver "cat >> ~/hopper"

iPad (Blink)

blink> ssh myserver "cat ~/hopper" | pbcopy

Also can do in reverse to move clipboard data from iPad to another machine.

sukima avatar Jan 12 '22 21:01 sukima

Is there a better place or method to report this bug? Should it be routed to a dependency of the project instead of this repo?

Any hints on where this might be coming from? Any thoughts. on next actions?

Thanks.

sukima avatar May 21 '24 00:05 sukima