mirror of
https://github.com/denisidoro/navi.git
synced 2026-07-17 16:49:25 +00:00
Update clipboard.rs
This commit is contained in:
parent
ed1791c71a
commit
970cd7f5f0
1 changed files with 5 additions and 4 deletions
|
|
@ -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(),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue