Update clipboard.rs

This commit is contained in:
emma31-dev 2026-04-06 00:34:58 +01:00
parent ed1791c71a
commit 970cd7f5f0

View file

@ -1,5 +1,5 @@
use crate::common::shell::{out, ShellSpawnError, EOF};
use crate::prelude::*;
use anyhow::Result;
pub fn copy(text: String) -> Result<()> {
let cmd = r#"
@ -22,12 +22,13 @@ _copy() {
out()
.arg(
format!(
r#"{cmd}
read -r -d '' x <<'{EOF}'
r#"
{cmd}
read -r -d '' x <<'{EOF}'
{text}
{EOF}
echo -n "$x" | _copy"#,
echo -n "$x" | _copy"#
)
.as_str(),
)