You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
julia> clipboard("Help, I'm trapped inside the computer!")
Waiting for selection requests, Control-C to quit
Waiting for selection request number 1
Here Julia is waiting on xclip, which runs until another program intercedes to reset the clipboard. It would be more convenient -- for me, at least -- if xclip and xsel could detach themselves and run in the background. That way, we could carry on with our program in the meantime. It would only take an option change to fix:
--- base/interactiveutil.jl
+++ base/interactiveutil.jl
@@ -108,8 +108,8 @@
end
function clipboard(x)
c = clipboardcmd()
- cmd = c == :xsel ? `xsel --nodetach --input --clipboard` :
- c == :xclip ? `xclip -quiet -in -selection clipboard` :
+ cmd = c == :xsel ? `xsel --input --clipboard` :
+ c == :xclip ? `xclip -silent -in -selection clipboard` :
error("unexpected clipboard command: $c")
open(pipeline(cmd, stderr=STDERR), "w") do io
print(io, x)
(Compare–contrast the clipboard() method, where running in the foreground is natural; xsel and xclip return as soon as they've retrieved its contents.)
The text was updated successfully, but these errors were encountered:
This is still an issue for me today: clipboard(x) hangs because of the --nodetach option for xsel. If I remove the --nodetach option, this works. Should we remove --nodetach?
Julia Version 1.3.0
Commit 46ce4d7933 (2019-11-26 06:09 UTC)
Platform Info:
OS: Linux (x86_64-pc-linux-gnu)
CPU: Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
JULIA_EDITOR = subl
Here Julia is waiting on xclip, which runs until another program intercedes to reset the clipboard. It would be more convenient -- for me, at least -- if xclip and xsel could detach themselves and run in the background. That way, we could carry on with our program in the meantime. It would only take an option change to fix:
(Compare–contrast the
clipboard()
method, where running in the foreground is natural; xsel and xclip return as soon as they've retrieved its contents.)The text was updated successfully, but these errors were encountered: