@@ -77,7 +77,6 @@ export namespace Clipboard {
7777 const os = platform ( )
7878
7979 if ( os === "darwin" && Bun . which ( "osascript" ) ) {
80- console . log ( "clipboard: using osascript" )
8180 return async ( text : string ) => {
8281 const escaped = text . replace ( / \\ / g, "\\\\" ) . replace ( / " / g, '\\"' )
8382 await $ `osascript -e 'set the clipboard to "${ escaped } "'` . nothrow ( ) . quiet ( )
@@ -86,7 +85,6 @@ export namespace Clipboard {
8685
8786 if ( os === "linux" ) {
8887 if ( process . env [ "WAYLAND_DISPLAY" ] && Bun . which ( "wl-copy" ) ) {
89- console . log ( "clipboard: using wl-copy" )
9088 return async ( text : string ) => {
9189 const proc = Process . spawn ( [ "wl-copy" ] , { stdin : "pipe" , stdout : "ignore" , stderr : "ignore" } )
9290 if ( ! proc . stdin ) return
@@ -96,7 +94,6 @@ export namespace Clipboard {
9694 }
9795 }
9896 if ( Bun . which ( "xclip" ) ) {
99- console . log ( "clipboard: using xclip" )
10097 return async ( text : string ) => {
10198 const proc = Process . spawn ( [ "xclip" , "-selection" , "clipboard" ] , {
10299 stdin : "pipe" ,
@@ -110,7 +107,6 @@ export namespace Clipboard {
110107 }
111108 }
112109 if ( Bun . which ( "xsel" ) ) {
113- console . log ( "clipboard: using xsel" )
114110 return async ( text : string ) => {
115111 const proc = Process . spawn ( [ "xsel" , "--clipboard" , "--input" ] , {
116112 stdin : "pipe" ,
@@ -126,9 +122,7 @@ export namespace Clipboard {
126122 }
127123
128124 if ( os === "win32" ) {
129- console . log ( "clipboard: using powershell" )
130125 return async ( text : string ) => {
131- // Pipe via stdin to avoid PowerShell string interpolation ($env:FOO, $(), etc.)
132126 const proc = Process . spawn (
133127 [
134128 "powershell.exe" ,
@@ -151,7 +145,6 @@ export namespace Clipboard {
151145 }
152146 }
153147
154- console . log ( "clipboard: no native support" )
155148 return async ( text : string ) => {
156149 await clipboardy . write ( text ) . catch ( ( ) => { } )
157150 }
0 commit comments