-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Labels
REPLJulia's REPL (Read Eval Print Loop)Julia's REPL (Read Eval Print Loop)
Description
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.)
Metadata
Metadata
Assignees
Labels
REPLJulia's REPL (Read Eval Print Loop)Julia's REPL (Read Eval Print Loop)