Skip to content

Commit 959dc5f

Browse files
committed
feat(list): Print the clipboard notification regardless of the OS, then print the additional information about clipboard persistence if necessary.
1 parent 0ca2500 commit 959dc5f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/clipboard.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ pub fn copy_str_to_clipboard(contents: &str) -> Result<()> {
2626
.set_contents(contents.to_owned())
2727
.map_err(|_| anyhow!("unable to set clipboard contents"))?;
2828

29-
// https://github.com/alacritty/copypasta/issues/49
3029
eprintln!();
30+
eprintln!("Note: The output has been copied to the clipboard!");
31+
32+
// https://github.com/alacritty/copypasta/issues/49
3133
if NON_PERSISTENT_CLIPBOARD_OSES.contains(&OS) {
3234
eprintln!(
33-
"Note: On this OS, the clipboard contents will be lost when the application that set \
34-
them exits."
35+
"On this OS, the clipboard contents will be lost when the application that set them \
36+
exits."
3537
);
3638
eprintln!(
3739
"To avoid this, {APPLICATION_PROPER_NAME} will wait until Enter is pressed before \
3840
exiting so that the contents can be pasted where they're needed."
3941
);
4042
await_user_input();
41-
} else {
42-
eprintln!("Note: The output has been copied to the clipboard!");
4343
}
4444

4545
Ok(())

0 commit comments

Comments
 (0)